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:
Adam Cooke
2024-02-23 22:51:33 +00:00
committed by Adam Cooke
parent 044058d0f1
commit dc8e895bfe
69 changed files with 1675 additions and 1186 deletions
@@ -0,0 +1,17 @@
# frozen_string_literal: true
class ActionDeletionsScheduledTask < ApplicationScheduledTask
def call
Organization.deleted.each do |org|
logger.info "permanently removing organization #{org.id} (#{org.permalink})"
org.destroy
end
Server.deleted.each do |server|
logger.info "permanently removing server #{server.id} (#{server.full_permalink})"
server.destroy
end
end
end