celeryd 529 B

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