Browse Source

fix: 修复执行任务中心报错的问题

pull/10721/head
Bai 1 year ago committed by Jiangjie.Bai
parent
commit
954f86f8a9
  1. 8
      apps/ops/tasks.py

8
apps/ops/tasks.py

@ -64,7 +64,13 @@ def job_execution_task_activity_callback(self, execution_id, *args, **kwargs):
activity_callback=job_execution_task_activity_callback
)
def run_ops_job_execution(execution_id, **kwargs):
execution = get_object_or_none(JobExecution, id=execution_id)
with tmp_to_root_org():
execution = get_object_or_none(JobExecution, id=execution_id)
if not execution:
logger.error("Did not get the execution: {}".format(execution_id))
return
try:
with tmp_to_org(execution.org):
execution.start()

Loading…
Cancel
Save