mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 19:44:36 +08:00
17 lines
337 B
Ruby
17 lines
337 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Jobs
|
||
|
class CleanupRedeliveringWebHookEvents < ::Jobs::Scheduled
|
||
|
every 1.hour
|
||
|
|
||
|
sidekiq_options queue: "low"
|
||
|
|
||
|
def execute(args)
|
||
|
RedeliveringWebhookEvent
|
||
|
.includes(web_hook_event: :web_hook)
|
||
|
.where("created_at < ?", 8.hour.ago)
|
||
|
.delete_all
|
||
|
end
|
||
|
end
|
||
|
end
|