forked from celery/celery
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ask Solem
committed
Jun 13, 2009
1 parent
dbfbd2f
commit d40630d
Showing
4 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
from celery.bin.celeryctl import celery_control, parse_options | ||
|
||
if __name__ == "__main__": | ||
options, values = parse_options(sys.argv[1:]) | ||
celery_control(*values, **dict(options)) | ||
|
||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
from celery.bin.celeryd import main, parse_options | ||
from celery.bin.celeryd import run_worker, parse_options | ||
|
||
if __name__ == "__main__": | ||
options = parse_options(sys.argv[1:]) | ||
main(concurrency=options.concurrency, | ||
daemon=options.daemon, | ||
logfile=options.logfile, | ||
loglevel=options.loglevel, | ||
pidfile=options.pidfile, | ||
queue_wakeup_after=options.queue_wakeup_after) | ||
run_worker(**options) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import os | ||
import sys | ||
sys.path.append(os.getcwd()) | ||
django_project_dir = os.environ.get("DJANGO_PROJECT_DIR") | ||
if django_project_dir: | ||
sys.path.append(django_project_dir) | ||
from django.conf import settings | ||
import optparse | ||
|
||
OPTION_LIST = () | ||
|
||
|
||
def parse_options(arguments): | ||
"""Parse the available options to ``celeryctl``.""" | ||
parser = optparse.OptionParser(option_list=OPTION_LIST) | ||
options, values = parser.parse_args(arguments) | ||
return options, values | ||
|
||
|
||
def celery_control(*args, **kwargs): | ||
print("ARGS: %s" % args) | ||
print("KWARGS: %s" % kwargs) |
This file contains 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