File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change 369
369
if ALGOLIA ["API_KEY" ]:
370
370
INSTALLED_APPS += ["algoliasearch_django" ]
371
371
372
- # CELERY_BROKER_URL = env('REDIS_URL', default='redis://localhost/')
373
- CELERY_BROKER_URL = env ("CLOUDAMQP_URL" , default = "amqp://localhost" )
372
+ CELERY_BROKER_URL = env ("REDIS_URL" , default = "redis://localhost/" )
374
373
CELERY_RESULT_BACKEND = env ("REDIS_URL" , default = "redis://localhost/" )
375
374
376
375
Original file line number Diff line number Diff line change 173
173
REDIS_URL = env ("REDIS_URL" , default = "redis://127.0.0.1:6379" )
174
174
REDIS_LOCATION = f"{ REDIS_URL } /{ 0 } "
175
175
176
-
177
176
# Heroku URL does not pass the DB number, so we parse it in
178
177
CACHES = {
179
178
"default" : {
191
190
}
192
191
193
192
# Update Celery settings to handle SSL
194
- if REDIS_URL .startswith ("rediss://" ):
195
- CELERY_BROKER_USE_SSL = {"ssl_cert_reqs" : None }
196
- CELERY_REDIS_BACKEND_USE_SSL = {"ssl_cert_reqs" : None }
193
+ CELERY_BROKER_TRANSPORT_OPTIONS = {"ssl" : {"ssl_cert_reqs" : ssl .CERT_NONE }}
194
+ CELERY_RESULT_BACKEND_TRANSPORT_OPTIONS = {"ssl_cert_reqs" : ssl .CERT_NONE }
197
195
198
196
# Sentry Configuration
199
197
Original file line number Diff line number Diff line change 1
1
import os
2
2
3
3
from celery import Celery
4
- from django .conf import settings
5
4
6
- os .environ .setdefault ("DJANGO_SETTINGS_MODULE" , "config.settings.local" )
5
+ if "DJANGO_SETTINGS_MODULE" not in os .environ :
6
+ os .environ ["DJANGO_SETTINGS_MODULE" ] = "config.settings.local"
7
7
8
8
app = Celery ("fpbase" , namespace = "CELERY" )
9
9
app .config_from_object ("django.conf:settings" , namespace = "CELERY" )
10
10
11
- # Configure SSL settings for Redis if using secure connection
12
- if settings .CELERY_RESULT_BACKEND .startswith ("rediss://" ):
13
- app .conf .update (
14
- redis_backend_use_ssl = settings .CELERY_REDIS_BACKEND_USE_SSL , broker_use_ssl = settings .CELERY_BROKER_USE_SSL
15
- )
16
-
17
11
# Load task modules from all registered Django app configs.
18
12
app .autodiscover_tasks ()
You can’t perform that action at this time.
0 commit comments