【问题标题】:delete Task / PeriodicTask in celery删除 celery 中的 Task / PeriodicTask
【发布时间】:2011-02-03 04:27:50
【问题描述】:

如何删除 celery 中的常规 Task 或 PeriodicTask?

【问题讨论】:

    标签: python rabbitmq celery


    【解决方案1】:

    revoke的任务:见documentation

    Control.revoke(task_id, destination=None, terminate=False, signal='SIGTERM', **kwargs)
        Tell all (or specific) workers to revoke a task by id.
    
        If a task is revoked, the workers will ignore the task and not execute it after all.
    
        Parameters: 
            task_id – Id of the task to revoke.
            terminate – Also terminate the process currently working on the task (if any).
            signal – Name of signal to send to process if terminate. Default is TERM.
    

    【讨论】:

    • 如何获取所有任务列表?
    猜你喜欢
    • 2015-08-27
    • 1970-01-01
    • 2013-07-07
    • 2015-06-06
    • 2019-11-11
    • 1970-01-01
    • 2020-06-15
    • 2018-01-29
    • 2013-03-18
    相关资源
    最近更新 更多