Skip to content

Commit

Permalink
添加任务时,关闭原来任务
Browse files Browse the repository at this point in the history
  • Loading branch information
woshiyanghai committed Sep 13, 2024
1 parent 4ec80ae commit c509fe8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/sql_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ def execute(request):
update_fields=["status"]
)
# 删除定时执行任务
schedule_name = SqlWorkflow(id=workflow_id).timing_task_id
workflow_detail = SqlWorkflow.objects.get(id=workflow_id)
schedule_name = workflow_detail.timing_task_id
del_schedule(schedule_name)
# 加入执行队列
execute_sql_excute.apply_async(
Expand Down

0 comments on commit c509fe8

Please sign in to comment.