hudson.triggers.Trigger.run()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(212)

本文整理了Java中hudson.triggers.Trigger.run()方法的一些代码示例,展示了Trigger.run()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trigger.run()方法的具体详情如下:
包路径:hudson.triggers.Trigger
类名称:Trigger
方法名:run

Trigger.run介绍

[英]Executes the triggered task. This method is invoked when #Trigger(String) is used to create an instance, and the crontab matches the current time.
[中]执行触发的任务。当使用#Trigger(String)创建实例,并且crontab与当前时间匹配时,会调用此方法。

代码示例

代码示例来源:origin: jenkinsci/jenkins

public void run(AbstractProject p) {
    for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) {
      if (t instanceof SCMTrigger) {
        LOGGER.fine("synchronously triggering SCMTrigger for project " + t.job.getName());
        t.run();
      }
    }
  }
}));

代码示例来源:origin: jenkinsci/jenkins

LOGGER.log(Level.CONFIG, "cron triggered {0}", p);
try {
  t.run();
} catch (Throwable e) {

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

public void superRun() {
  super.run();
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public void run(AbstractProject p) {
    for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) {
      if (t instanceof SCMTrigger) {
        LOGGER.fine("synchronously triggering SCMTrigger for project " + t.job.getName());
        t.run();
      }
    }
  }
}));

代码示例来源:origin: hudson/hudson-2.x

public void run(AbstractProject p) {
    for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) {
      if (t instanceof SCMTrigger) {
        LOGGER.fine("synchronously triggering SCMTrigger for project " + t.job.getName());
        t.run();
      }
    }
  }
}));

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public void run(AbstractProject p) {
    for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) {
      if (t instanceof SCMTrigger) {
        LOGGER.fine("synchronously triggering SCMTrigger for project " + t.job.getName());
        t.run();
      }
    }
  }
}));

代码示例来源:origin: org.eclipse.hudson/hudson-core

public void run(AbstractProject p) {
    for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) {
      if (t instanceof SCMTrigger) {
        LOGGER.fine("synchronously triggering SCMTrigger for jobs " + t.getJobNames());
        t.run();
      }
    }
  }
}));

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public void run(AbstractProject p) {
    for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) {
      if (t instanceof SCMTrigger) {
        LOGGER.fine("synchronously triggering SCMTrigger for project " + t.job.getName());
        t.run();
      }
    }
  }
}));

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

@Override
public void run() {
  initPython();
  if (pexec.isImplemented(1)) {
    pexec.execPythonVoid("run");
  } else {
    super.run();
  }
}

代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder

LOGGER.log(Level.CONFIG, "cron triggered {0}", p.getName());
try {
  t.run();
} catch (Throwable e) {

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

LOGGER.log(Level.CONFIG, "cron triggered {0}", p);
try {
  t.run();
} catch (Throwable e) {

代码示例来源:origin: hudson/hudson-2.x

LOGGER.config("cron triggered "+p.getName());
try {
  t.run();
} catch (Throwable e) {

代码示例来源:origin: jenkinsci/cloudbees-folder-plugin

/**
 * Checks the triggers.
 *
 * @param cal the date to check for.
 */
public void checkTriggers(final Calendar cal) {
  for (ComputedFolder<?> p : Jenkins.get().allItems(ComputedFolder.class)) {
    for (Trigger<?> t : p.getTriggers().values()) {
      LOGGER.log(Level.FINE, "cron checking {0}", p.getName());
      CronTabList tabs;
      try {
        tabs = (CronTabList) this.tabsField.get(t);
      } catch (IllegalAccessException e) {
        continue;
      }
      if (tabs == null) {
        LOGGER.log(Level.FINE, "cron for {0} has not been started", p.getFullName());
      } else if (tabs.check(cal)) {
        LOGGER.log(Level.CONFIG, "cron triggered {0}", p.getFullName());
        try {
          t.run();
        } catch (Throwable e) {
          // t.run() is a plugin, and some of them throw RuntimeException and other things.
          // don't let that cancel the polling activity. report and move on.
          LOGGER.log(Level.WARNING, t.getClass().getName() + ".run() failed for " + p.getFullName(), e);
        }
      }
    }
  }
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

LOGGER.config("cron triggered "+p.getName());
try {
  t.run();
} catch (Throwable e) {

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

LOGGER.config("cron triggered "+p.getName());
try {
  t.run();
} catch (Throwable e) {

代码示例来源:origin: org.eclipse.hudson/hudson-core

LOGGER.config("cron triggered " + p.getName());
try {
  t.run();
} catch (Throwable e) {

相关文章