Skip to content

Commit

Permalink
Fix double enqueuing of upload jobs
Browse files Browse the repository at this point in the history
The canonical place to call enqueue is in
https://github.com/galaxyproject/galaxy/blob/a5bb3e92667b96ef802b378f17788b253a5c0bc6/lib/galaxy/tools/execute.py#L127.
In the process of enqueue the db-skip-locked assignment method will set
the handler name to the default tag. If you do this more than once the
job might be picked up by compatible handlers.

Fixes #11335
  • Loading branch information
mvdbeek committed Oct 21, 2021
1 parent 6fcdc5c commit 1ff980f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions lib/galaxy/tools/actions/history_imp_exp.py
Expand Up @@ -67,11 +67,6 @@ def execute(self, tool, trans, incoming=None, set_output_hid=False, overwrite=Tr
job.add_parameter(name, value)

job.state = start_job_state # job inputs have been configured, restore initial job state

# Queue the job for execution
trans.app.job_manager.enqueue(job, tool=tool)
trans.log_event("Added import history job to the job queue, id: %s" % str(job.id), tool_id=job.tool_id)

return job, {}


Expand Down
3 changes: 0 additions & 3 deletions lib/galaxy/tools/actions/upload_common.py
Expand Up @@ -441,9 +441,6 @@ def create_job(trans, params, tool, json_file_path, outputs, folder=None, histor
job.add_parameter(name, value)
trans.sa_session.add(job)

# Queue the job for execution
trans.app.job_manager.enqueue(job, tool=tool)
trans.log_event("Added job to the job queue, id: %s" % str(job.id), tool_id=job.tool_id)
output = {}
for i, v in enumerate(outputs):
if not hasattr(output_object, "collection_type"):
Expand Down

0 comments on commit 1ff980f

Please sign in to comment.