BigW Consortium Gitlab

remove_old_web_hook_logs_worker.rb 224 Bytes
Newer Older
1
class RemoveOldWebHookLogsWorker
2
  include ApplicationWorker
3 4 5 6 7 8 9 10
  include CronjobQueue

  WEB_HOOK_LOG_LIFETIME = 2.days

  def perform
    WebHookLog.destroy_all(['created_at < ?', Time.now - WEB_HOOK_LOG_LIFETIME])
  end
end