mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 09:45:11 +02:00
Add sidekiq as a job backend
This commit is contained in:
parent
313731232e
commit
929ada8fd0
22 changed files with 109 additions and 154 deletions
|
@ -19,8 +19,12 @@ module Domain::Deletable
|
|||
end
|
||||
|
||||
def do_not_delete_later
|
||||
# Que job can be manually deleted in admin area UI
|
||||
QueJob.find_by("args->>0 = '#{id}'", job_class: DomainDeleteJob.name)&.destroy
|
||||
return if Rails.env.test?
|
||||
|
||||
jobs = Sidekiq::ScheduledSet.new.select do |job|
|
||||
job.args.first['job_class'] == 'DomainDeleteJob' && job.args.first['arguments'] == [id]
|
||||
end
|
||||
jobs.each(&:delete)
|
||||
end
|
||||
|
||||
def deletion_time_span
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue