Class: Jobs::CleanupRedeliveringWebHookEvents
- Defined in:
- app/jobs/scheduled/cleanup_redelivering_web_hook_events.rb
Instance Method Summary collapse
Methods inherited from Scheduled
Methods inherited from Base
acquire_cluster_concurrency_lock!, clear_cluster_concurrency_lock!, cluster_concurrency, cluster_concurrency_redis_key, delayed_perform, #error_context, get_cluster_concurrency, #last_db_duration, #log, #perform, #perform_immediately
Instance Method Details
#execute(args) ⇒ Object
9 10 11 12 13 14 |
# File 'app/jobs/scheduled/cleanup_redelivering_web_hook_events.rb', line 9 def execute(args) RedeliveringWebhookEvent .includes(web_hook_event: :web_hook) .where("created_at < ?", 8.hour.ago) .delete_all end |