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})
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})