()
return jsonify({'msg': '暂停成功', 'status': 1})
暂停任务
暂停任务
暂停任务
def pause_task():
    """ 暂停任务 """
    data = request.json
    ids = data.get('id')
    _data = Task.query.filter_by(id=ids).first()
    _data.status = '暂停'
    scheduler.pause_job(str(ids))  # 添加任务
    db.session.commit()

    return jsonify({'msg': '暂停成功', 'status': 1})
def pause_task ( ) : data = request . json ids = data . get ( 'id' ) _data = Task . query . filter_by ( id = ids ) . first ( ) _data . status = '暂停' scheduler . pause_job ( str ( ids ) ) # 添加任务 db . session . commit ( ) return jsonify ( { 'msg' : '暂停成功', 'statu s : 1})