Ensure that execute_in of a build schedule is not negative

This commit is contained in:
Winnie Hellmann 2018-09-20 09:29:41 +02:00 committed by Alessio Caiazza
parent f9877d715f
commit 7fffe0fb37
1 changed files with 1 additions and 1 deletions

View File

@ -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