diff --git a/cron/cron.go b/cron/cron.go index 7f34312..33f04f1 100644 --- a/cron/cron.go +++ b/cron/cron.go @@ -99,10 +99,10 @@ func StartCron(ctx context.Context, c *cron.Cron, errC chan error) { if i == config.GlobalConfig.Backend.Retry { errC <- ErrReachedRetryTimes } + // TODO: optimize transaction handling tx := storage.DB.Begin() err := UpdateTask(ctx, tx) if err == nil { - // TODO: merge to one transaction tx.Commit() j := 0 for {