Created
December 22, 2009 00:54
-
-
Save westurner/261401 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/celery/bin/celerybeat.py b/celery/bin/celerybeat.py | |
index a288780..bfc2d62 100644 | |
--- a/celery/bin/celerybeat.py | |
+++ b/celery/bin/celerybeat.py | |
@@ -176,7 +176,9 @@ def parse_options(arguments): | |
options, values = parser.parse_args(arguments) | |
return options | |
- | |
-if __name__ == "__main__": | |
+def main(): | |
options = parse_options(sys.argv[1:]) | |
run_clockservice(**vars(options)) | |
+ | |
+if __name__ == "__main__": | |
+ main() | |
\ No newline at end of file | |
diff --git a/celery/bin/celeryd.py b/celery/bin/celeryd.py | |
index 88234d4..c693df3 100644 | |
--- a/celery/bin/celeryd.py | |
+++ b/celery/bin/celeryd.py | |
@@ -275,7 +275,9 @@ def set_process_status(info): | |
info = "%s (%s)" % (info, " ".join(sys.argv[arg_start:])) | |
platform.set_mp_process_title("celeryd", info=info) | |
- | |
-if __name__ == "__main__": | |
+def main(): | |
options = parse_options(sys.argv[1:]) | |
run_worker(**vars(options)) | |
+ | |
+if __name__ == "__main__": | |
+ main() | |
\ No newline at end of file | |
diff --git a/setup.py b/setup.py | |
index 45cad5c..e0de878 100644 | |
--- a/setup.py | |
+++ b/setup.py | |
@@ -116,5 +116,12 @@ setup( | |
"Topic :: System :: Distributed Computing", | |
"Topic :: Software Development :: Libraries :: Python Modules", | |
], | |
+ entry_points={ | |
+ 'console_scripts': [ | |
+ 'celeryd = celery.bin.celeryd:main', | |
+ 'celeryinit = celery.bin.celeryinit:main', | |
+ 'celerybeat = celery.bin.celerybeat:main' | |
+ ] | |
+ }, | |
long_description=long_description, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment