Ensure that execute_in of a build schedule is not negative
This commit is contained in:
parent
f9877d715f
commit
7fffe0fb37
|
@ -11,7 +11,7 @@ module Ci
|
|||
after_create :schedule, unless: :importing?
|
||||
|
||||
def execute_in
|
||||
self.execute_at - Time.now
|
||||
[0, self.execute_at - Time.now].max
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue