Skip to content

Commit 429a036

Browse files
committed
refactor: reorganize Redis config and dependencies between base and local settings
1 parent 6c4336c commit 429a036

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

config/celery_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from celery.signals import setup_logging
55

66
# set the default Django settings module for the 'celery' program.
7-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
7+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.base")
88

99
app = Celery("coinfolio")
1010

config/settings/base.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,7 @@
326326
"CLIENT_CLASS": "django_redis.client.DefaultClient",
327327
# Mimicing memcache behavior.
328328
# https://github.com/jazzband/django-redis#memcached-exceptions-behavior
329-
"IGNORE_EXCEPTIONS": False,
330-
"ssl_cert_reqs": None,
331-
"VERSION": None,
332-
"CONNECTION_KWARGS": {
333-
"health_check_interval": 30
334-
}
329+
# "IGNORE_EXCEPTIONS": True,
335330
},
336331
},
337332
}

config/settings/local.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@
2626
"CLIENT_CLASS": "django_redis.client.DefaultClient",
2727
# Mimicing memcache behavior.
2828
# https://github.com/jazzband/django-redis#memcached-exceptions-behavior
29-
"IGNORE_EXCEPTIONS": True,
29+
"IGNORE_EXCEPTIONS": False,
30+
"ssl_cert_reqs": None,
31+
"VERSION": None,
32+
"CONNECTION_KWARGS": {
33+
"health_check_interval": 30
34+
},
3035
},
3136
},
3237
}

requirements/base.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ redis==6.2.0 # https://github.com/redis/redis-py
66
hiredis==3.2.1 # https://github.com/redis/hiredis-py
77
celery==5.5.3 # pyup: < 6.0 # https://github.com/celery/celery
88
django-celery-beat==2.8.1 # https://github.com/celery/django-celery-beat
9-
9+
django-celery-results==2.6.0 # https://github.com/celery/django-celery-results
10+
# Ccxt
11+
ccxt==2.4.67 # https://github.com/ccxt/ccxt
1012
# Django
1113
# ------------------------------------------------------------------------------
1214
django==5.1.11 # pyup: < 5.2 # https://www.djangoproject.com/

requirements/production.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,3 @@ psycopg[c]==3.2.9 # https://github.com/psycopg/psycopg
88
# Django
99
# ------------------------------------------------------------------------------
1010
django-anymail[brevo]==13.0 # https://github.com/anymail/django-anymail
11-
12-
# Ccxt
13-
ccxt==2.4.67 # https://github.com/ccxt/ccxt
14-
django-celery-results==2.6.0 # https://github.com/celery/django-celery-results

0 commit comments

Comments
 (0)