celeryd 579 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env python
  2. import sys
  3. if not '' in sys.path:
  4. sys.path.insert(0, '')
  5. from celery.bin import celeryd
  6. WINDOWS_MESSAGE = """
  7. The celeryd command does not work on Windows.
  8. Instead, please use:
  9. ..> python -m celery.bin.celeryd
  10. You can also supply arguments:
  11. ..> python -m celery.bin.celeryd --concurrency=10 --loglevel=DEBUG
  12. """
  13. def main():
  14. if sys.platform == "win32":
  15. print(WINDOWS_MESSAGE)
  16. sys.exit()
  17. options = celeryd.parse_options(sys.argv[1:])
  18. celeryd.run_worker(**vars(options))
  19. if __name__ == "__main__":
  20. main()