2018-11-08 19:23:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
class RemoveOldWebHookLogsWorker
|
2018-03-17 18:26:18 +05:30
|
|
|
include ApplicationWorker
|
2017-09-10 17:25:29 +05:30
|
|
|
include CronjobQueue
|
|
|
|
|
|
|
|
WEB_HOOK_LOG_LIFETIME = 2.days
|
|
|
|
|
|
|
|
def perform
|
|
|
|
WebHookLog.destroy_all(['created_at < ?', Time.now - WEB_HOOK_LOG_LIFETIME])
|
|
|
|
end
|
|
|
|
end
|