Example #1
0
 private void updateFlowReference() throws ExecutorManagerException {
   logger.info("Update active reference");
   if (!executorLoader.updateExecutableReference(execId, System.currentTimeMillis())) {
     throw new ExecutorManagerException(
         "The executor reference doesn't exist. May have been killed prematurely.");
   }
 }
Example #2
0
 private synchronized void updateFlow(long time) {
   try {
     flow.setUpdateTime(time);
     executorLoader.updateExecutableFlow(flow);
   } catch (ExecutorManagerException e) {
     logger.error("Error updating flow.", e);
   }
 }
  private FlowRunner createFlowRunner(String flowName, HashMap<String, String> flowParams)
      throws Exception {
    Flow flow = flowMap.get(flowName);

    int exId = id++;
    ExecutableFlow exFlow = new ExecutableFlow(project, flow);
    exFlow.setExecutionPath(workingDir.getPath());
    exFlow.setExecutionId(exId);

    exFlow.getExecutionOptions().addAllFlowParameters(flowParams);
    fakeExecutorLoader.uploadExecutableFlow(exFlow);

    FlowRunner runner =
        new FlowRunner(
            fakeExecutorLoader.fetchExecutableFlow(exId),
            fakeExecutorLoader,
            fakeProjectLoader,
            jobtypeManager);
    return runner;
  }
Example #4
0
  private void closeLogger() {
    if (logger != null) {
      logger.removeAppender(flowAppender);
      flowAppender.close();

      try {
        executorLoader.uploadLogFile(execId, "", 0, logFile);
      } catch (ExecutorManagerException e) {
        e.printStackTrace();
      }
    }
  }