run.cmd 1.0 KB

12345678910111213141516171819202122232425262728293031
  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. rem App instance to use
  7. rem comment out this line if you don't use an app
  8. set CELERY_APP=proj
  9. rem or fully qualified:
  10. rem CELERY_APP="proj.tasks:app"
  11. set PATH_TO_PROJECT=D:\home\site\wwwroot
  12. rem Absolute or relative path to the 'celery' and 'Python' command:
  13. set CELERY_BIN=%PATH_TO_PROJECT%\env\Scripts\celery
  14. rem - %n will be replaced with the first part of the nodename.
  15. rem - %I will be replaced with the current child process index
  16. rem and is important when using the prefork pool to avoid race conditions.
  17. set CELERYD_PID_FILE=%PATH_TO_PROJECT%\log\celery.pid
  18. set CELERYD_LOG_FILE=%PATH_TO_PROJECT%\log\celery.log
  19. set CELERYD_LOG_LEVEL=INFO
  20. rem You might need to change th path of the Python runing
  21. set PYTHONPATH=%PYTHONPATH%;%PATH_TO_PROJECT%;
  22. cd %PATH_TO_PROJECT%
  23. del %CELERYD_PID_FILE%
  24. del %CELERYD_LOG_FILE%
  25. %CELERY_BIN% -A %CELERY_APP% worker --loglevel=%CELERYD_LOG_LEVEL% -P eventlet