Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-24244] If we are skipping polling due to quietingDown, at le…
…ast record this fact in the system log.
  • Loading branch information
jglick committed Aug 21, 2014
1 parent df4ba0d commit 608517e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/src/main/java/hudson/triggers/SCMTrigger.java
Expand Up @@ -67,10 +67,8 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.logging.Level;
import static java.util.logging.Level.WARNING;
import java.util.logging.Logger;
import jenkins.model.Jenkins;
import jenkins.model.RunAction2;
import jenkins.triggers.SCMTriggerItem;
import net.sf.json.JSONObject;
import org.kohsuke.accmod.restrictions.NoExternalUse;
Expand All @@ -80,7 +78,6 @@
import static java.util.logging.Level.*;
import jenkins.model.RunAction2;

import javax.annotation.Nonnull;

/**
* {@link Trigger} that checks for SCM updates periodically.
Expand Down Expand Up @@ -131,8 +128,10 @@ public void run() {
* @since 1.375
*/
public void run(Action[] additionalActions) {
if(Jenkins.getInstance().isQuietingDown())
return; // noop
if (Jenkins.getInstance().isQuietingDown()) {
LOGGER.log(INFO, "Skipping polling for {0} since Jenkins is in quiet mode", job.getFullName());
return;
}

DescriptorImpl d = getDescriptor();

Expand Down

0 comments on commit 608517e

Please sign in to comment.