mirror of https://github.com/openspug/spug
U - 任务管理 禁止未设置触发器的任务启动
parent
d0ca9d23f6
commit
976374b5c5
|
@ -91,6 +91,8 @@ def set_trigger(job_id):
|
|||
def switch(job_id):
|
||||
job = Job.query.get_or_404(job_id)
|
||||
if request.method == 'POST':
|
||||
if job.trigger is None:
|
||||
return json_response(message='请在 更多-设置触发器 中配置调度策略')
|
||||
job.update(enabled=True)
|
||||
scheduler.add_job(job)
|
||||
elif request.method == 'DELETE':
|
||||
|
|
Loading…
Reference in New Issue