tasks.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:django-celery-rabbitmq-example 作者: Giangblackk 项目源码 文件源码
def task_id_sent_handler(sender=None, result = None, **kwargs):
    # information about task are located in headers for task messages
    # using the task protocol version 2.
    print(type(result))
    print(result)
    print('\n ***Task Success***')
    url = 'http://localhost:8000'
    requests.post(url)

# @task_revoked.connect
# def my_task_revoked_handler(sender=None, body=None, *args,  **kwargs):
#     print(kwargs['request'].args)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号