Scheduling¶
Functions¶
register_cron¶
-
Day of the week number. Defaults to
each. 0 - Sunday 1 - Monday 2 - Tuesday 3 - Wednesday 4 - Thursday 5 - Friday 6 - Saturday -
Month number 1-12. Defaults to
each. -
Day of the month number 1-31. Defaults to
each. -
Hour 0-23. Defaults to
each. -
Minute 0-59. Defaults to
each. -
Existing signal to raise or Signal Target to register signal implicitly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Available signal targets: * Mule / Farm / Signal object - run on a certain mule, farm or issue a signal. * ``workers`` - run the signal handler on all the workers * ``workerN`` - run the signal handler only on worker N * ``worker``/``worker0`` - run the signal handler on the first available worker * ``active-workers`` - run the signal handlers on all the active [non-cheaped] workers * ``mules`` - run the signal handler on all the mules * ``muleN`` - run the signal handler on mule N * ``mule``/``mule0`` - run the signal handler on the first available mule * ``spooler`` - run the signal on the first available spooler * ``farmN/farm_XXX`` - run the signal handler in the mule farm N or named XXX -
TaskChecker to be used for task execution requirements checking.
Adds cron. The interface to the uWSGI signal cron facility.
Note
Arguments work similarly to a standard crontab, but instead of "*", use -1, and instead of "/2", "/3", etc. use -2 and -3, etc.
Note
Periods - rules like hour='10-18/2' (from 10 till 18 every 2 hours) - are allowed, but they are emulated by uwsgiconf. Use strings to define periods.
1 2 | |
ValueError If unable to add cron rule.
register_timer¶
-
Existing signal to raise or Signal Target to register signal implicitly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Available signal targets: * Mule / Farm / Signal object - run on a certain mule, farm or issue a signal. * ``workers`` - run the signal handler on all the workers * ``workerN`` - run the signal handler only on worker N * ``worker``/``worker0`` - run the signal handler on the first available worker * ``active-workers`` - run the signal handlers on all the active [non-cheaped] workers * ``mules`` - run the signal handler on all the mules * ``muleN`` - run the signal handler on mule N * ``mule``/``mule0`` - run the signal handler on the first available mule * ``spooler`` - run the signal on the first available spooler * ``farmN/farm_XXX`` - run the signal handler in the mule farm N or named XXX -
TaskChecker to be used for task execution requirements checking.
Add timer.
Can be used as a decorator:
1 2 3 4 5 | |
ValueError If unable to add timer.
register_timer_ms¶
-
The interval (milliseconds) at which the signal is raised.
-
Existing signal to raise or Signal Target to register signal implicitly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Available signal targets: * Mule / Farm / Signal object - run on a certain mule, farm or issue a signal. * ``workers`` - run the signal handler on all the workers * ``workerN`` - run the signal handler only on worker N * ``worker``/``worker0`` - run the signal handler on the first available worker * ``active-workers`` - run the signal handlers on all the active [non-cheaped] workers * ``mules`` - run the signal handler on all the mules * ``muleN`` - run the signal handler on mule N * ``mule``/``mule0`` - run the signal handler on the first available mule * ``spooler`` - run the signal on the first available spooler * ``farmN/farm_XXX`` - run the signal handler in the mule farm N or named XXX -
TaskChecker to be used for task execution requirements checking.
Add a millisecond resolution timer.
1 2 3 4 5 | |
ValueError If unable to add timer.
register_timer_rb¶
-
The interval (seconds) at which the signal is raised.
-
How many times to send signal. Will stop after ther number is reached. Default: None - infinitely.
-
Existing signal to raise or Signal Target to register signal implicitly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Available signal targets: * Mule / Farm / Signal object - run on a certain mule, farm or issue a signal. * ``workers`` - run the signal handler on all the workers * ``workerN`` - run the signal handler only on worker N * ``worker``/``worker0`` - run the signal handler on the first available worker * ``active-workers`` - run the signal handlers on all the active [non-cheaped] workers * ``mules`` - run the signal handler on all the mules * ``muleN`` - run the signal handler on mule N * ``mule``/``mule0`` - run the signal handler on the first available mule * ``spooler`` - run the signal on the first available spooler * ``farmN/farm_XXX`` - run the signal handler in the mule farm N or named XXX -
TaskChecker to be used for task execution requirements checking.
Add a red-black timer (based on black-red tree).
1 2 3 4 5 | |
ValueError If unable to add timer.