Debian Codegraph @

extra/WindowsCMD-AzureWebJob/CeleryBeat/run.cmd

raw
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
15 rem Absolute or relative path to the 'celery' and 'Python' command:
16 set CELERY_BIN=%PATH_TO_PROJECT%\env\Scripts\celery
17
18 rem How to call manage.py
19 set CELERYD_MULTI=multi
20
21 rem - %n will be replaced with the first part of the nodename.
22 rem - %I will be replaced with the current child process index
23 rem and is important when using the prefork pool to avoid race conditions.
24 set CELERYD_PID_FILE=%PATH_TO_PROJECT%\log\celerybeat.pid
25 set CELERYD_LOG_FILE=%PATH_TO_PROJECT%\log\celerybeat.log
26 set CELERYD_LOG_LEVEL=INFO
27
28 rem CONFIG RELATED TO THE BEAT
29 set CELERYD_DATABASE=django
30 set CELERYD_SCHEDULER=django_celery_beat.schedulers:DatabaseScheduler
31
32 rem You might need to change th path of the Python running
33 set PYTHONPATH=%PYTHONPATH%;%PATH_TO_PROJECT%;
34
35 cd %PATH_TO_PROJECT%
36 del %CELERYD_PID_FILE%
37 del %CELERYD_LOG_FILE%
38
39 %CELERY_BIN% -A %CELERY_APP% beat -S %CELERYD_DATABASE% --logfile=%CELERYD_LOG_FILE% --pidfile=%CELERYD_PID_FILE% --scheduler %CELERYD_SCHEDULER% --loglevel=%CELERYD_LOG_LEVEL%