Keep scheduler jobs unique until they're done (#8287)
This commit is contained in:
@ -5,6 +5,8 @@ class Scheduler::IpCleanupScheduler
|
||||
|
||||
RETENTION_PERIOD = 1.year
|
||||
|
||||
sidekiq_options unique: :until_executed
|
||||
|
||||
def perform
|
||||
time_ago = RETENTION_PERIOD.ago
|
||||
SessionActivation.where('updated_at < ?', time_ago).destroy_all
|
||||
|
Reference in New Issue
Block a user