Skip to content

Commit d0e03de

Browse files
sjanssen2antgonza
andauthored
Fix multiple validation jobs (#3465)
* Update CHANGELOG.md * multiple validation jobs should be submitted as lead and dependent jobs, but the later must also made known by the DB --------- Co-authored-by: Antonio Gonzalez <[email protected]>
1 parent d49339f commit d0e03de

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

qiita_db/processing_job.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -1105,13 +1105,23 @@ def submit(self, parent_job_id=None, dependent_jobs_list=None):
11051105
# organized into n 'queues' or 'chains', and
11061106
# will all run simultaneously.
11071107
for dependent in dependent_jobs_list:
1108+
# register dependent job as queued to make qiita
1109+
# aware of this child process
1110+
dependent._set_status('queued')
1111+
1112+
dep_software = dependent.command.software
1113+
dep_job_dir = join(qdb.util.get_work_base_dir(),
1114+
dependent.id)
11081115
p = Process(target=launcher['function'],
1109-
args=(plugin_env_script,
1110-
plugin_start_script,
1116+
args=(dep_software.environment_script,
1117+
dep_software.start_script,
11111118
url,
1112-
self.id,
1113-
job_dir))
1119+
dependent.id,
1120+
dep_job_dir))
11141121
p.start()
1122+
# assign the child process ID as external id to
1123+
# the dependent
1124+
dependent.external_id = p.pid
11151125
else:
11161126
error = ("execute_in_process must be defined",
11171127
"as either true or false")

0 commit comments

Comments
 (0)