chore: add mercury

This commit is contained in:
xuu
2024-01-22 16:00:58 -07:00
parent eb63312542
commit d4e021386b
47 changed files with 6456 additions and 152 deletions

View File

@@ -127,9 +127,6 @@ func (c *cron) run(ctx context.Context, now time.Time) {
case <-timer.C:
}
span.AddEvent("Cron Run: " + now.Format(time.RFC822))
// fmt.Println("Cron Run: ", now.Format(time.RFC822))
c.state.Use(ctx, func(ctx context.Context, state *state) error {
run = append(run, state.queue...)
state.queue = state.queue[:0]
@@ -148,6 +145,9 @@ func (c *cron) run(ctx context.Context, now time.Time) {
return
}
span.AddEvent("Cron Run: " + now.Format(time.RFC822))
// fmt.Println("Cron Run: ", now.Format(time.RFC822))
wg, _ := errgroup.WithContext(ctx)
for i := range run {