示例#1
0
  @Override
  public void run() {
    while (isActive()) {
      JobMachine.JobEntry job = machine.pollJob();
      if (job == null) {
        continue;
      }

      currentJob = job;
      try {
        machine.runJobEntry(currentJob);
      } catch (Throwable ex) {
        logger.error("unexpected exception: " + ex.getMessage(), ex);
      } finally {
        currentJob = null;
      }
    }
  }
示例#2
0
 public boolean isActive() {
   return active && machine.isActive();
 }