supervisor is a process management tool under Linux, which can manage the services running in the foreground, while the services in the background need to be transformed into foreground before they can be managed through supervisor. The celery process started by the celery multi start command is background by default. Now you want to convert it into a foreground command and manage it through supervisor. The above are the requirements:
the problem with celery multi start startup. The command to start with celery multi start is as follows,
celery multi start worker-collect \
-A test_collect --purge \
--loglevel=info \
-Q collect \
--logfile=/tmp/test-build.log \
--pidfile=/run/test-collect.pid
since this startup is background by default, its process cannot be managed using supervisor. Now I want to convert it to foreground startup, and modify
to
celery worker -A test_collect --purge \
--loglevel=info \
-Q collect
--logfile=/tmp/test-build.log \
--pidfile=/run/test-collect.pid \
--concurrency=3 -n worker-collect@%h
ask friends who are familiar with celery,
question 1: is the result of the above two commands equivalent? If there is a difference, can you describe it in detail?
question 2: can you give the corresponding supervisor.ini configuration file after conversion? (similar to reference)
reference link:
- ide/workers.html" rel=" nofollow noreferrer "> http://docs.celeryproject.org.
- http://docs.celeryproject.org.
- https://stackoverflow.com/que.