Skip to content

Commit

Permalink
split monolithic executeWorkflow in blocks (minimal diff)
Browse files Browse the repository at this point in the history
  • Loading branch information
eudoxos committed May 21, 2024
1 parent ee563aa commit 5f4409f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mupifDB/workflowscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,15 @@ def copyLogToDB (we_id, workflowLogName):
log.error(repr(e))


def executeWorkflow(lock, schedulerStat, we_id):
def executeWorkflow(lock, schedulerStat, we_id) -> None:
try:
log.info("executeWorkflow invoked")
executeWorkflow_inner(lock, schedulerStat, we_id)
except Exception as e:
log.error("Execution of workflow %s failed." % we_id)
log.error(repr(e))

def executeWorkflow_inner(lock, schedulerStat, we_id) -> None:
we_rec = restApiControl.getExecutionRecord(we_id)
if we_rec is None:
log.error("Workflow Execution record %s not found" % we_id)
Expand Down Expand Up @@ -470,10 +475,6 @@ def executeWorkflow(lock, schedulerStat, we_id):
else:
log.error("WEID %s not scheduled for execution" % we_id)
raise KeyError("WEID %s not scheduled for execution" % we_id)
except Exception as e:
log.error("Execution of workflow %s failed." % we_id)
log.error(repr(e))


def stop(var_pool):
try:
Expand Down

0 comments on commit 5f4409f

Please sign in to comment.