support periodically cleaning up expired tokens
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
"github.com/mayswind/ezbookkeeping/pkg/api"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/core"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/cron"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/errs"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/log"
|
||||
"github.com/mayswind/ezbookkeeping/pkg/middlewares"
|
||||
@@ -62,6 +63,13 @@ func startWebServer(c *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = cron.InitializeCronJobSchedulerContainer(config, true)
|
||||
|
||||
if err != nil {
|
||||
log.BootErrorf("[webserver.startWebServer] initializes cron job scheduler failed, because %s", err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
serverInfo := fmt.Sprintf("current server id is %d, current instance id is %d", requestid.Container.Current.GetCurrentServerUniqId(), requestid.Container.Current.GetCurrentInstanceUniqId())
|
||||
uuidServerInfo := ""
|
||||
if config.UuidGeneratorType == settings.InternalUuidGeneratorType {
|
||||
|
||||
Reference in New Issue
Block a user