I\'m using celery (solo pool with concurrency=1) and I want to be able to shut down the worker after a particular task has run. A caveat is that I want to avoid any possibility
If you need to shutdown a specific worker and don't know it's name in advance, you can get it from the task properties. Based on the answers above, you can use:
app.control.shutdown(destination=[self.request.hostname])
or
app.control.broadcast('shutdown', destination=[self.request.hostname])
Note:
'-n'
);bind=True
parameter.