celeryd 518 B

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