| 1 |
rem Name of nodes to start |
| 2 |
rem here we have a single node |
| 3 |
set CELERYD_NODES=w1 |
| 4 |
rem or we could have three nodes: |
| 5 |
rem CELERYD_NODES="w1 w2 w3" |
| 6 |
|
| 7 |
rem App instance to use |
| 8 |
rem comment out this line if you don't use an app |
| 9 |
set CELERY_APP=proj |
| 10 |
rem or fully qualified: |
| 11 |
rem CELERY_APP="proj.tasks:app" |
| 12 |
|
| 13 |
set PATH_TO_PROJECT=D:\home\site\wwwroot |
| 14 |
rem Absolute or relative path to the 'celery' and 'Python' command: |
| 15 |
set CELERY_BIN=%PATH_TO_PROJECT%\env\Scripts\celery |
| 16 |
|
| 17 |
rem - %n will be replaced with the first part of the nodename. |
| 18 |
rem - %I will be replaced with the current child process index |
| 19 |
rem and is important when using the prefork pool to avoid race conditions. |
| 20 |
set CELERYD_PID_FILE=%PATH_TO_PROJECT%\log\celery.pid |
| 21 |
set CELERYD_LOG_FILE=%PATH_TO_PROJECT%\log\celery.log |
| 22 |
set CELERYD_LOG_LEVEL=INFO |
| 23 |
|
| 24 |
rem You might need to change th path of the Python running |
| 25 |
set PYTHONPATH=%PYTHONPATH%;%PATH_TO_PROJECT%; |
| 26 |
|
| 27 |
cd %PATH_TO_PROJECT% |
| 28 |
del %CELERYD_PID_FILE% |
| 29 |
del %CELERYD_LOG_FILE% |
| 30 |
|
| 31 |
%CELERY_BIN% -A %CELERY_APP% worker --loglevel=%CELERYD_LOG_LEVEL% -P eventlet |