8 lines
191 B
Ruby
8 lines
191 B
Ruby
|
class ActiveJobLockCleanupJob < ApplicationJob
|
||
|
include HasActiveJobLock
|
||
|
|
||
|
def perform(diff = 1.day)
|
||
|
::ActiveJobLock.where('created_at < ?', Time.zone.now - diff).destroy_all
|
||
|
end
|
||
|
end
|