chore: enhance devcontainer and cron job configuration

- Add cloc to devcontainer Dockerfile for code line counting
- Modify cron job to start cleaning expired auth tokens immediately
This commit is contained in:
Jacky 2025-02-05 21:29:43 +08:00
parent a00a4f19d2
commit 03b02010ed
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
2 changed files with 2 additions and 2 deletions

View file

@ -70,7 +70,7 @@ func cleanExpiredAuthToken() {
logger.Debug("clean expired auth tokens")
q := query.AuthToken
_, _ = q.Where(q.ExpiredAt.Lt(time.Now().Unix())).Delete()
}), gocron.WithSingletonMode(gocron.LimitModeWait))
}), gocron.WithSingletonMode(gocron.LimitModeWait), gocron.JobOption(gocron.WithStartImmediately()))
if err != nil {
logger.Fatalf("CleanExpiredAuthToken Err: %v\n", err)