Skip to content

Commit

Permalink
Merge pull request #575 from shankari/create_tree_pipeline
Browse files Browse the repository at this point in the history
Fix errors in loading and purging the multi-timeline
  • Loading branch information
shankari authored Mar 13, 2018
2 parents 0db16b7 + 9752525 commit 35aa174
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/debug/load_multi_timeline_for_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ def load_pipeline_states(file_prefix, all_uuid_list):
pipeline_filename = "%s_pipelinestate_%s.gz" % (file_prefix, curr_uuid)
print("Loading pipeline state for %s from %s" %
(curr_uuid, pipeline_filename))
with gzip.open(filename) as gfd:
with gzip.open(pipeline_filename) as gfd:
states = json.load(gfd, object_hook = bju.object_hook)
if args.verbose:
logging.debug("Loading states of length %s" % len(states))
edb.get_pipeline_state_db().insert_many(states)

def post_check(unique_user_list, all_rerun_list):
Expand Down
3 changes: 3 additions & 0 deletions bin/debug/purge_multi_timeline_for_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
psdb = edb.get_pipeline_state_db()

for i, filename in enumerate(sel_file_list):
if "pipelinestate" in filename:
continue

logging.info("=" * 50)
logging.info("Deleting data from file %s" % filename)

Expand Down

0 comments on commit 35aa174

Please sign in to comment.