Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions convention-template/config/settings.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ if not DEBUG:
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": f"redis://{cfg.redis.host}:{cfg.redis.port}",
"LOCATION": f"redis://{cfg.redis.host}:{cfg.redis.port}/{cfg.redis.db}",
},
}

Expand Down Expand Up @@ -278,7 +278,7 @@ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
# Async tasks
CELERY_RESULT_BACKEND = "django-db"
CELERY_CACHE_BACKEND = "default"
CELERY_BROKER_URL = f"redis://{cfg.redis.host}:{cfg.redis.port}"
CELERY_BROKER_URL = f"redis://{cfg.redis.host}:{cfg.redis.port}/{cfg.redis.db}"
CELERY_TIMEZONE = "America/Los_Angeles"
CELERY_TASK_TRACK_STARTED = True
CELERY_TASK_TIME_LIMIT = 30 * 60
Expand Down
4 changes: 2 additions & 2 deletions nomnom_dev/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def __bool__(self): # if using Python 2, use __nonzero__ instead
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": f"redis://{cfg.redis.host}:{cfg.redis.port}",
"LOCATION": f"redis://{cfg.redis.host}:{cfg.redis.port}/{cfg.redis.db}",
},
}

Expand Down Expand Up @@ -307,7 +307,7 @@ def __bool__(self): # if using Python 2, use __nonzero__ instead
# Async tasks
CELERY_RESULT_BACKEND = "django-db"
CELERY_CACHE_BACKEND = "default"
CELERY_BROKER_URL = f"redis://{cfg.redis.host}:{cfg.redis.port}"
CELERY_BROKER_URL = f"redis://{cfg.redis.host}:{cfg.redis.port}/{cfg.redis.db}"
CELERY_TIMEZONE = "America/Los_Angeles"
CELERY_TASK_TRACK_STARTED = True
CELERY_TASK_TIME_LIMIT = 30 * 60
Expand Down
1 change: 1 addition & 0 deletions src/nomnom/convention.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class DB:
class REDIS:
host = var()
port = var(get_compose_port("redis", 6379, 6379), converter=int)
db = var(0, converter=int)

@config
class EMAIL:
Expand Down
Loading