Esempio n. 1
0
def del_sqlcronjob(job_id):
    try:
        sql_schedule = Schedule.objects.get(name=job_id)
        Schedule.delete(sql_schedule)
        logger.debug('del_sqlcronjob:' + job_id)
    except Schedule.DoesNotExist:
        logger.debug('del_sqlcronjob {} failed, job does not exist'.format(job_id))
Esempio n. 2
0
def del_schedule(name):
    """删除task"""
    try:
        sql_schedule = Schedule.objects.get(name=name)
        Schedule.delete(sql_schedule)
        # logger.debug(f'删除task:{name}')
    except Schedule.DoesNotExist:
        pass