mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #5073 from jmchilton/backport_5045
[17.09] Backport #5045
This commit is contained in:
@@ -202,10 +202,10 @@ class WorkflowRequestMonitor(object):
|
||||
sa_session = self.app.model.context
|
||||
workflow_invocation = sa_session.query(model.WorkflowInvocation).get(invocation_id)
|
||||
|
||||
if not workflow_invocation or not workflow_invocation.active:
|
||||
return False
|
||||
|
||||
try:
|
||||
if not workflow_invocation or not workflow_invocation.active:
|
||||
return False
|
||||
|
||||
# This ensures we're only ever working on the 'first' active
|
||||
# workflow invocation in a given history, to force sequential
|
||||
# activation.
|
||||
@@ -218,6 +218,8 @@ class WorkflowRequestMonitor(object):
|
||||
# TODO: eventually fail this - or fail it right away?
|
||||
log.exception("Exception raised while attempting to schedule workflow request.")
|
||||
return False
|
||||
finally:
|
||||
sa_session.expunge_all()
|
||||
|
||||
# A workflow was obtained and scheduled...
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user