mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-24 17:00:06 +00:00
💄
This commit is contained in:
@@ -19,9 +19,7 @@ import (
|
||||
func (s *Scheduler) RegisterDbCleanupJobs(ctx context.Context, db *gorm.DB) error {
|
||||
jobs := &DbCleanupJobs{db: db}
|
||||
|
||||
// Use exponential backoff for each DB cleanup job so transient query failures
|
||||
// are retried automatically rather than causing an immediate job failure.
|
||||
// Each job gets its own backoff instance to avoid shared state.
|
||||
// Use exponential backoff for each DB cleanup job so transient query failures are retried automatically rather than causing an immediate job failure
|
||||
return errors.Join(
|
||||
s.RegisterJob(ctx, "ClearWebauthnSessions", jobDefWithJitter(24*time.Hour), jobs.clearWebauthnSessions, service.RegisterJobOpts{RunImmediately: true, BackOff: backoff.NewExponentialBackOff()}),
|
||||
s.RegisterJob(ctx, "ClearOneTimeAccessTokens", jobDefWithJitter(24*time.Hour), jobs.clearOneTimeAccessTokens, service.RegisterJobOpts{RunImmediately: true, BackOff: backoff.NewExponentialBackOff()}),
|
||||
|
||||
Reference in New Issue
Block a user