Don't automatically trigger paused jobs
@@ -393,6 +393,7 @@ public class DeploymentTrigger {
public boolean triggerAt(Instant instant, JobType job, Versions versions, Application application) {
Optional<JobStatus> jobStatus = application.deploymentJobs().statusOf(job);
if ( ! jobStatus.isPresent()) return true;
+ if (jobStatus.get().pausedUntil().isPresent() && jobStatus.get().pausedUntil().getAsLong() > clock.instant().toEpochMilli()) return false;
if (jobStatus.get().isSuccess()) return true; // Success
if ( ! jobStatus.get().lastCompleted().isPresent()) return true; // Never completed
if ( ! jobStatus.get().firstFailing().isPresent()) return true; // Should not happen as firstFailing should be set for an unsuccessful job
