Welcome to mirror list, hosted at ThFree Co, Russian Federation.

remove_old_web_hook_logs_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 17140ac44500dfb40857cf160375a13b097c5d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class RemoveOldWebHookLogsWorker
  include ApplicationWorker
  include CronjobQueue

  WEB_HOOK_LOG_LIFETIME = 2.days

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