Task management:
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/8C/7F/wKioL1huTiCx0wz9AABiY2tFjhs429.png "title=" Clipboard.png "alt=" Wkiol1huticx0wz9aabiy2tfjhs429.png "/>
Note: As standard output after running a task, transport is the message agent, concurrency is the default process pool process, and when all child processes are busy, they must wait for the idle subprocess to be processed, if it is IO intensive and try to use the eventlet/ Gevent, refer to http://docs.jinkan.org/docs/celery/userguide/concurrency/index.html#concurrency , result is stored for results, and queue is a list of all queues and switch information
Parameters |
Meaning |
%p |
Node full name, such as [email protected] |
%n |
Contains only host names, such as Foo |
%h |
Host name that contains the domain name, such as Bar.example.com |
%d |
Include only domain names, such as example.com |
%i |
Prefork type of process index, the main process is 0, according to the name specified by-n generates a corresponding 1-based name, commonly used to create a unique log file for each child process |
%I |
Prefork type of process index, the main process is empty, the corresponding name is generated from 1 based on the name specified by-N, and is commonly used to create a unique log file for each child process. |
# Start Node
Celery Multi Start notify-a work.app-c 4-l info--pidfile=notify.pid--logfile=notify.log
# Close Node
Celery Multi Stop notify-a work.app-c 4-l info--pidfile=notify.pid--logfile=notify.log
Celery multi stopwait notify-a work.app-c 4-l info--pidfile=notify.pid--logfile=notify.log
Celery multi Kill notify-a work.app-c 4-l info--pidfile=notify.pid--logfile=notify.log
# Restart Node
Celery Multi Restart notify-a work.app-c 4-l info--pidfile=notify.pid--logfile=notify.log
# View Nodes
Celery multi names notify-a work.app-c 4-l info--pidfile=notify.pid--logfile=notify.log
Celery Multi Show notify-a work.app-c 4-l info--pidfile=notify.pid--logfile=notify.log
Description: Celery provides a multi sub-name, it is convenient to manage the launch of the Celery app (notify represents the unique identity of the app,-a represents the application's portal file, and-C indicates the number of child processes that will start under the default worker process,--Pidfile represents the process file,-- LogFile represents a log file)/Shutdown (stop indicates an asynchronous stop application, stopwait indicates a synchronous wait to stop the app, kill means to terminate the app, but be aware that--pidfile and--logfile must be specified)/reboot (restart indicates a restart application, However, it is important to note that the default multi does not remember the previous startup parameters, so it needs to be the same as the startup parameters)
Extensions: If you want to track the logs of different sub-processes, you can use the above formatting parameters directly in--pidfile and--logfile, such as celery multi start notify-a work.app-c 4-l info--pidfile=notify %i.pid--logfile=notify%i.log, the process ID and log file for different processes will be generated in the current running directory, but it will be less convenient when you close and restart.
Task Scheduler:
Celery beat--help
Task tracking:
Celery result--help
Celery-a Work.app Inspect--help
Online Control:
Celery AMQP--help
Celery-a Work.app Control--help
Online node:
Celery-a Work.app Status
This article is from the "Li-Yun Development Road" blog, please be sure to keep this source http://xmdevops.blog.51cto.com/11144840/1889510
Basic Primer _python-modules and packages. In-depth celery node management/task scheduling/task tracking?