djcelery

Python Celery - How to call celery tasks inside other task

混江龙づ霸主 提交于 2019-11-29 14:42:37
问题 I'm calling a task within a tasks in Django-Celery Here are my tasks. @shared_task def post_notification(data,url): url = "http://posttestserver.com/data/?dir=praful" # when in production, remove this line. headers = {'content-type': 'application/json'} requests.post(url, data=json.dumps(data), headers=headers) @shared_task def shipment_server(data,notification_type): notification_obj = Notification.objects.get(name = notification_type) server_list = ServerNotificationMapping.objects.filter