Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyPythons committed Jan 10, 2018
1 parent 88a2b63 commit 183f41f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DAGflow/do_DAG.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ def update_task_status(tasks):

for task_id in tasks.keys():

if "id" not in tasks[task_id]:
tasks[task_id]["id"] = ""

if os.path.exists(tasks[task_id]["done"]):
tasks[task_id]["status"] = "success"
continue

if "id" not in tasks[task_id]:
tasks[task_id]["id"] = ""

if "status" not in tasks[task_id]:
tasks[task_id]["status"] = "preparing"

Expand Down Expand Up @@ -297,10 +297,10 @@ def write_tasks(tasks, filename):
if not isinstance(tasks[task_id]["id"], str):
tasks[task_id]["id"] = "local"

if failed_tasks:
with open(filename, "w") as out:
json.dump(tasks, out, indent=2)
with open(filename, "w") as out:
json.dump(tasks, out, indent=2)

if failed_tasks:
LOG.info("""\
The following tasks were failed:
%s
Expand Down

0 comments on commit 183f41f

Please sign in to comment.