예제 #1
0
def del_cron_job(project_id, cron_job_id):
    try:
        cron_manager.del_cron(cron_id=cron_job_id)
        return jsonify({'status': 'ok', 'data': '删除成功'})
    except BaseException as e:
        current_app.logger.error("del cron job failed. - %s" % str(e))
        return jsonify({'status': 'ok', 'data': '删除失败: %s' % e})
예제 #2
0
def del_cron(cron_id):
    try:
        cron_manager.del_cron(cron_id=cron_id)
        return jsonify({'status': 'ok', 'data': '删除成功'})
    except BaseException as e:
        return jsonify({'status': 'ok', 'data': '删除失败: %s' % e})