Allow creating a background job with run_at in the past

#790
This commit is contained in:
Artur Beljajev 2018-06-11 10:59:19 +03:00
parent e34ef78c4d
commit fd383a9c18

View file

@ -14,8 +14,7 @@ module Concerns::Domain::Deletable
end
def deletion_time_span
# 5 minutes to ensure we don't create a background job with past `run_at`
((Time.zone.now + 5.minutes).to_i)..(deletion_deadline.to_i)
Time.zone.now.to_i..deletion_deadline.to_i
end
def deletion_deadline