Joal has uploaded a new change for review.
https://gerrit.wikimedia.org/r/287075
Change subject: Correct bug in oozie rerun script
......................................................................
Correct bug in oozie rerun script
Change-Id: I082a6890e1ca5b0fa1e31c56ceaa6369a40ea6fa
---
M bin/refinery-oozie-rerun
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery
refs/changes/75/287075/1
diff --git a/bin/refinery-oozie-rerun b/bin/refinery-oozie-rerun
index 83ff2a3..12064a6 100755
--- a/bin/refinery-oozie-rerun
+++ b/bin/refinery-oozie-rerun
@@ -158,6 +158,7 @@
offset = coord_num_actions
len_ = 100
action_date = None
+ prev_date = None
while not action_date and offset > 0:
offset = offset - len_ + 1
params = {"len": len_, "offset": offset}
@@ -177,7 +178,6 @@
# Set date to the last one not yet succeded
# or let it loop to another offset (many waiting actions)
else:
- prev_date = None
for date, succeeded in actions_info:
if prev_date and succeeded:
action_date = prev_date
@@ -187,9 +187,13 @@
# if no action_date has been found
if not action_date:
- # There could be only waiting actions in the list
+ # If waiting actions but no yet succeeded ones
if prev_date:
return prev_date
+ elif coord_json["status"] == "PREP":
+ # if no waiting action and "Prep" mode
+ return make_datetime(coord_json["startTime"])
+ # Only waiting actions, return first one
else:
raise RuntimeError("Could not determine next action to run" +
"for coord {0}".format(coord_id))
--
To view, visit https://gerrit.wikimedia.org/r/287075
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I082a6890e1ca5b0fa1e31c56ceaa6369a40ea6fa
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: Joal <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits