mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Added fastroute for user facing requests
This commit is contained in:
@@ -19,7 +19,7 @@ CELERYBEAT_SCHEDULE = {
|
||||
},
|
||||
"blacklist-check": {
|
||||
"task": "hr.tasks.blacklist_check",
|
||||
"schedule": timedelta(days=1),
|
||||
"schedule": timedelta(days=7),
|
||||
},
|
||||
"reddit-update": {
|
||||
"task": "reddit.tasks.queue_account_updates",
|
||||
@@ -30,4 +30,6 @@ CELERYBEAT_SCHEDULE = {
|
||||
CELERY_ROUTES = {
|
||||
"sso.tasks.update_service_groups": {'queue': 'bulk'},
|
||||
"hr.tasks.blacklist_check": {'queue': 'bulk'},
|
||||
"eve_api.tasks.import_apikey_result": {'queue': 'fastresponse'},
|
||||
"sso.tasks.update_user_access": {'queue': 'fastresponse'},
|
||||
}
|
||||
|
||||
@@ -51,4 +51,3 @@ MANAGERS = ADMINS
|
||||
|
||||
CELERY_ALWAYS_EAGER = True
|
||||
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
|
||||
|
||||
|
||||
5
fabfile.py
vendored
5
fabfile.py
vendored
@@ -19,7 +19,8 @@ def production():
|
||||
env.uwsgiconfig = os.path.join(env.path, '..', 'etc', 'uwsgi', 'dreddit-auth.ini')
|
||||
env.password = sha1('%s-%s' % (env.user, env.vhost)).hexdigest()
|
||||
|
||||
env.celeryconf = '-l INFO --settings=%(config)s --pidfile=logs/%%n.pid --logfile=logs/%%n.log -n auth.pleaseignore.com bulk default -Q:bulk bulk -c 5 -c:bulk 3 -B:default' % env
|
||||
env.celeryconf = '-l INFO --settings=%(config)s --pidfile=logs/%%n.pid --logfile=logs/%%n.log -n auth.pleaseignore.com bulk default fastresponse -Q:bulk bulk -Q:fastresponse fastresponse -c 5 -c:bulk 3 -c:fastresponse 3 -B --scheduler=djcelery.schedulers.DatabaseScheduler' % env
|
||||
|
||||
|
||||
def test():
|
||||
"Use the test enviroment on Web2"
|
||||
@@ -157,6 +158,7 @@ def stop_celeryd():
|
||||
with cd('%(path)s/dreddit-auth/' % env):
|
||||
run('. env/bin/activate; app/manage.py celeryd_multi stop %(celeryconf)s' % env)
|
||||
|
||||
|
||||
def kill_celeryd():
|
||||
"""
|
||||
Kills all Celeryd instances
|
||||
@@ -164,7 +166,6 @@ def kill_celeryd():
|
||||
with cd('%(path)s/dreddit-auth/' % env):
|
||||
run("ps auxww | grep celeryd | awk '{print $2}' | xargs kill -9")
|
||||
|
||||
|
||||
def restart_celeryd():
|
||||
"""
|
||||
Restart the celery daemon
|
||||
|
||||
Reference in New Issue
Block a user