simplyfy celery queue deployment
This commit is contained in:
parent
a8ccf08cd0
commit
7013814af8
5 changed files with 21 additions and 49 deletions
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
import sys
|
||||
import site
|
||||
|
||||
project_module = 'pandora'
|
||||
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
|
||||
#using virtualenv's activate_this.py to reorder sys.path
|
||||
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
|
||||
execfile(activate_this, dict(__file__=activate_this))
|
||||
|
||||
sys.path.append(root_dir)
|
||||
sys.path.append(os.path.join(root_dir, project_module))
|
||||
|
||||
from django.core.management import execute_manager
|
||||
|
||||
import settings
|
||||
execute_manager(settings, ['celeryd', 'celeryd', '-Q' 'encoding'])
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
import sys
|
||||
import site
|
||||
|
||||
project_module = 'pandora'
|
||||
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
|
||||
#using virtualenv's activate_this.py to reorder sys.path
|
||||
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
|
||||
execfile(activate_this, dict(__file__=activate_this))
|
||||
|
||||
sys.path.append(root_dir)
|
||||
sys.path.append(os.path.join(root_dir, project_module))
|
||||
|
||||
from django.core.management import execute_manager
|
||||
|
||||
import settings
|
||||
execute_manager(settings, ['celeryd', 'celeryd', '-Q' 'default'])
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue