mirror of
https://github.com/postalserver/postal.git
synced 2026-10-18 10:17:22 +00:00
feat: new background work process
This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PruneWebhookRequestsScheduledTask < ApplicationScheduledTask
|
||||
|
||||
def call
|
||||
Server.all.each do |s|
|
||||
logger.info "Pruning webhook requests for server #{s.id}"
|
||||
s.message_db.webhooks.prune
|
||||
end
|
||||
end
|
||||
|
||||
def self.next_run_after
|
||||
quarter_to_each_hour
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user