mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Added basic celery support and configuration.
This commit is contained in:
parent
da9a31b599
commit
a1fb81c4f4
4
Makefile
4
Makefile
@ -26,6 +26,10 @@ runserver:
|
||||
# run for testing the server
|
||||
python manage.py runserver
|
||||
|
||||
celeryd:
|
||||
# run to start the background celery worker
|
||||
python manage.py celeryd -l DEBUG -B
|
||||
|
||||
# already done and should not have to happen again:
|
||||
#
|
||||
#south_init:
|
||||
|
||||
7
lib/main/tasks.py
Normal file
7
lib/main/tasks.py
Normal file
@ -0,0 +1,7 @@
|
||||
from celery import task
|
||||
from lib.main.models import *
|
||||
|
||||
@task(name='run_launch_job')
|
||||
def run_launch_job(launch_job_pk):
|
||||
launch_job = LaunchJob.objects.get(pk=launch_job_pk)
|
||||
# FIXME: Do stuff here!
|
||||
@ -121,6 +121,8 @@ INSTALLED_APPS = (
|
||||
# 'devserver',
|
||||
'tastypie',
|
||||
'django_extensions',
|
||||
'djcelery',
|
||||
'kombu.transport.django',
|
||||
)
|
||||
|
||||
INTERNAL_IPS = ('127.0.0.1',)
|
||||
@ -136,3 +138,12 @@ DEVSERVER_MODULES = (
|
||||
#'devserver.modules.cache.CacheSummaryModule',
|
||||
#'devserver.modules.profile.LineProfilerModule',
|
||||
)
|
||||
|
||||
if 'djcelery' in INSTALLED_APPS:
|
||||
import djcelery
|
||||
djcelery.setup_loader()
|
||||
|
||||
BROKER_URL = 'django://'
|
||||
CELERY_TRACK_STARTED = True
|
||||
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
|
||||
CELERYBEAT_MAX_LOOP_INTERVAL = 60
|
||||
|
||||
@ -34,6 +34,7 @@ body
|
||||
color: white !important;
|
||||
}
|
||||
.module h2,
|
||||
.module h2 a,
|
||||
#content-related .module h2,
|
||||
.module caption,
|
||||
.inline-group h2,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user