提交 608517e1 编写于 作者: J Jesse Glick

[JENKINS-24244] If we are skipping polling due to quietingDown, at least...

[JENKINS-24244] If we are skipping polling due to quietingDown, at least record this fact in the system log.
上级 df4ba0d8
......@@ -67,10 +67,8 @@ import java.util.concurrent.ExecutorService;
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;
......@@ -80,7 +78,6 @@ import org.kohsuke.stapler.StaplerResponse;
import static java.util.logging.Level.*;
import jenkins.model.RunAction2;
import javax.annotation.Nonnull;
/**
* {@link Trigger} that checks for SCM updates periodically.
......@@ -131,8 +128,10 @@ public class SCMTrigger extends Trigger<Item> {
* @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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册