[Django]-Send celery task message to rabbitmq

6๐Ÿ‘

โœ…

You can use the send_task method to queue a task to an arbitrary celery broker. But, you do have to know the app name and broker url so that you can send the task to the right place.


from celery import Celery

app = Celery('app_name', broker='pyamqp://guest@localhost//')
app.send_task('namespace.my_task', kwargs={
    'arg1': 'value1',
    'arg2': 'value2',
})
๐Ÿ‘ค2ps

Leave a comment