At some point something changed in upstream config or in celery and now
a black transport is no longer valid. You have to supply some transport
even if you are running in always eager mode. Add enough config so that
celery tasks will execute without issues when running `runserver` on
baremetal.
Fixes the "No such transport" error:
```
File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/celery/app/task.py", line 575, in apply_async
with app.producer_or_acquire(producer) as eager_producer: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/celery/app/base.py", line 932, in producer_or_acquire producer, self.producer_pool.acquire, block=True,
^^^^^^^^^^^^^^^^^^
File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/celery/app/base.py", line 1354, in producer_pool
return self.amqp.producer_pool ^^^^^^^^^^^^^^^^^^^^^^^
File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/celery/app/amqp.py", line 591, in producer_pool
self.app.connection_for_write()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/celery/app/base.py", line 829, in connection_for_write
return self._connection(url or self.conf.broker_write_url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/celery/app/base.py", line 880, in _connection
return self.amqp.Connection(
^^^^^^^^^^^^^^^^^^^^^ File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/kombu/connection.py", line 201, in __init__
if not get_transport_cls(transport).can_parse_url: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/kombu/transport/__init__.py", line 91, in get_transport_cls _transport_cache[transport] = resolve_transport(transport)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/feanil/.virtualenvs/edx-platform/lib/python3.11/site-packages/kombu/transport/__init__.py", line 72, in resolve_transport
raise KeyError(f'No such transport: {transport}') KeyError: 'No such transport: '
```
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
# WARNING: Experimental
|
|
#
|
|
# This is the minimal settings you need to set to be able to get django to
|
|
# load when using the production.py settings files. It's useful to point
|
|
# LMS_CFG and CMS_CFG to this file to be able to run various npm commands
|
|
# and make targets (e.g.: building assets, pulling translations, etc.)
|
|
# without needing a full docker setup.
|
|
#
|
|
# Follow up work will likely be done as a part of
|
|
# https://github.com/openedx/wg-developer-experience/issues/136
|
|
---
|
|
|
|
SECRET_KEY: aseuothsaeotuhaseotisaotenihsaoetih
|
|
FEATURES:
|
|
PREVIEW_LMS_BASE: "http://localhost"
|
|
TRACKING_BACKENDS: {}
|
|
EVENT_TRACKING_BACKENDS: {}
|
|
JWT_AUTH: {}
|
|
CELERY_QUEUES: {}
|
|
MKTG_URL_LINK_MAP: {}
|
|
MKTG_URL_OVERRIDES: {}
|
|
REST_FRAMEWORK: {}
|
|
|
|
# We need MEDIA_ROOT because otherwise ./lms/djangoapps/certificates/migrations/0003_data__default_modes.py will fail.
|
|
#
|
|
# Using a local tmp location is not a good default for a production system. For production we should use
|
|
# off-machine storage to more easily scale the system.
|
|
MEDIA_ROOT: "/tmp/edx-platform/media/"
|
|
|
|
# DATA_DIR is overridden twice in ./lms/envs/common.py override it here temporarily until that's cleaned up and we
|
|
# can default to something dev friendly and have overrides in production.py for production friendly settings.
|
|
DATA_DIR: "/tmp/edx-platform/data_dir/"
|
|
|
|
# For just the CMS
|
|
LMS_ROOT_URL: "http://localhost"
|
|
LMS_INTERNAL_ROOT_URL: "http://localhost"
|
|
|
|
# So that Swagger config code doesn't complain
|
|
API_ACCESS_MANAGER_EMAIL: "api-access@example.com"
|
|
|
|
# So that you can login to studio on bare-metal
|
|
SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT: 'http://localhost:18000'
|
|
|
|
# The celery broker url needs to be set even if you're running in always eager mode.
|
|
CELERY_BROKER_TRANSPORT: 'memory'
|
|
CELERY_BROKER_HOSTNAME: 'localhost'
|