Skip to content

Commit

Permalink
Merge pull request #4 from SpazioDati/armisael-patch-2
Browse files Browse the repository at this point in the history
Armisael patch 2
  • Loading branch information
ugoscaiella authored Feb 6, 2017
2 parents 9e3c706 + 7d7da2c commit b18a2c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>eu-spaziodati</groupId>
<artifactId>azkaban-plugins-groovy</artifactId>
<packaging>jar</packaging>
<version>0.4.14</version>
<version>0.4.15</version>
<description>A set of plugins for Azkaban workflow manager to run jobs as groovy scripts</description>
<url>https://github.com/SpazioDati/azkaban-groovy-plugin</url>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ public class ScriptHelper {
myFlowid = jobrunner.getNode().getParentFlow().getFlowId()
}

this.onfinishFlow(myFlowid, c)
}

def onfinishFlow (String flowId, Closure c) {
EventListener listener = new EventListener() {
def done = false
public void handleEvent(Event event) {
Expand All @@ -174,7 +178,7 @@ public class ScriptHelper {
if (event.data &&
event.data instanceof ExecutableFlowBase &&
// to match nested flows
(event.data as ExecutableFlowBase).nestedId.equals(myFlowid) &&
(event.data as ExecutableFlowBase).nestedId.equals(flowId) &&
event.runner instanceof FlowRunner) {

try {
Expand Down

0 comments on commit b18a2c6

Please sign in to comment.