Files
edx-platform/lms/envs/devstack_with_worker.py
M. Zulqarnain fc06846cb0 BOM-2368: pyupgrade in LMS Directory (#26649)
* pyupgrade in lms dir

* replace wildcard

* pep8 fix

* fix quality
2021-02-23 12:36:00 +05:00

26 lines
907 B
Python

"""
This config file follows the devstack enviroment, but adds the
requirement of a celery worker running in the background to process
celery tasks.
When testing locally, run lms/cms with this settings file as well, to test queueing
of tasks onto the appropriate workers.
In two separate processes on devstack:
paver devstack lms --settings=devstack_with_worker
DJANGO_SETTINGS_MODULE=lms.envs.devstack_with_worker celery worker --app=lms.celery:APP
"""
import os # lint-amnesty, pylint: disable=unused-import
from lms.envs.devstack import *
# Require a separate celery worker
CELERY_ALWAYS_EAGER = False
BROKER_URL = 'redis://:password@edx.devstack.redis:6379/'
# Disable transaction management because we are using a worker. Views
# that request a task and wait for the result will deadlock otherwise.
for database_name in DATABASES:
DATABASES[database_name]['ATOMIC_REQUESTS'] = False