Skip to content

Commit

Permalink
JumpMind#722 - Deploy resources on enable or run flow only.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwilmer committed May 18, 2017
1 parent 6e0f414 commit 7c1908a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ public Results execute(String userId, AgentDeployment deployment, Map<String, St

public String scheduleNow(String userId, AgentDeployment deployment, Map<String, String> runtimeParameters) {
log.info("Scheduling '{}' on '{}' for now", new Object[] { deployment.getName(), agent.getName() });
if (agent.isAutoRefresh()) {
deployResources(deployment);
}
String executionId = createExecutionId();
this.flowExecutionScheduler.schedule(new FlowRunner(userId, findDeployed(deployment), runtimeParameters, executionId), new Date());
return executionId;
Expand Down Expand Up @@ -646,8 +649,6 @@ public void run() {
stop(deployment, DeploymentStatus.DISABLED);
} else if (status.equals(DeploymentStatus.REQUEST_REENABLE)) {
stop(deployment, DeploymentStatus.REQUEST_ENABLE);
} else {
deployResources(deployment);
}
}
}
Expand Down

0 comments on commit 7c1908a

Please sign in to comment.