Increase the priority of background job of domain deletion

#790
This commit is contained in:
Artur Beljajev 2018-04-20 17:31:14 +03:00
parent 3e94c10da1
commit 6c7bfa01ac

View file

@ -5,7 +5,7 @@ module Concerns::Domain::Deletable
def delete_later
deletion_time = Time.zone.at(rand(deletion_time_span))
DomainDeleteJob.enqueue(id, run_at: deletion_time)
DomainDeleteJob.enqueue(id, run_at: deletion_time, priority: 1)
logger.info "Domain #{name} is scheduled to be deleted around #{deletion_time}"
end