mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
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:
parent
a00a4f19d2
commit
03b02010ed
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue