Skip to content

Commit

Permalink
a little bit more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rebrowning committed Jan 16, 2024
1 parent 4c0f102 commit 2b2d48c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions orquesta/conducting.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,7 @@ def get_staged_tasks(self, filtered=True):
if not filtered:
return self.staged

# resp = [x for x in self.staged if x["ready"] and not x.get("completed", False)]
resp = []
it_cnt = 0
for x in self.staged:
if x["ready"] and not x.get("completed", False):
resp.append(x)
it_cnt += 1
resp = [x for x in self.staged if x["ready"] and not x.get("completed", False)]
return resp

@property
Expand Down Expand Up @@ -713,7 +707,6 @@ def get_next_tasks(self):
# task rendering, then log the error and continue. This allows user to know about
# all task rendering errors for this task transition instead of getting rendering
# error one at a time during runtime.
it_cnt = 0
for staged_task in remediation_tasks or staged_tasks:
try:
next_task = self.get_task(staged_task["id"], staged_task["route"])
Expand All @@ -726,14 +719,12 @@ def get_next_tasks(self):

if "actions" in next_task and len(next_task["actions"]) > 0:
next_tasks.append(next_task)

elif "items_count" in next_task and next_task["items_count"] == 0:
next_tasks.append(next_task)
except Exception as e:
fail_on_task_rendering = True
self.log_error(e, task_id=staged_task["id"], route=staged_task["route"])
continue
it_cnt += 1

# Return nothing if there is error(s) on determining next tasks.
if fail_on_task_rendering:
Expand Down

0 comments on commit 2b2d48c

Please sign in to comment.