mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
Redis connections fix (#1219)
Hopefully going to make your day with this PR. The first commit is somewhat, but not entirely related changes. The actual fix is in the second commit changing the single Django setting.
This commit is contained in:
@@ -3,7 +3,6 @@ import os
|
||||
from celery import Celery
|
||||
from celery.schedules import crontab
|
||||
|
||||
|
||||
# set the default Django settings module for the 'celery' program.
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
|
||||
|
||||
|
||||
@@ -257,6 +257,7 @@ CELERY_TIMEZONE = "UTC"
|
||||
CELERY_BROKER_TRANSPORT_OPTIONS = {
|
||||
"max_connections": env.int("MAX_CELERY_CONNECTIONS", default=60)
|
||||
}
|
||||
CELERY_RESULT_BACKEND_THREAD_SAFE = True
|
||||
|
||||
CACHES = {
|
||||
"default": {
|
||||
|
||||
@@ -14,6 +14,8 @@ services:
|
||||
|
||||
redis:
|
||||
image: "redis:alpine"
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- backend
|
||||
volumes:
|
||||
@@ -91,7 +93,7 @@ services:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
/code/docker/wait-for-it.sh -h web -p 8000 -t 20 -- celery -A config worker --concurrency=10 --loglevel=debug
|
||||
/code/docker/wait-for-it.sh -h web -p 8000 -t 20 -- celery -A config worker --concurrency=10 -P gevent --loglevel=debug
|
||||
networks:
|
||||
- backend
|
||||
env_file:
|
||||
|
||||
@@ -14,9 +14,9 @@ django-rest-auth
|
||||
django-widget-tweaks
|
||||
djangorestframework>=3.14
|
||||
environs[django]
|
||||
greenlet==2.0.1
|
||||
greenlet==3.0.3
|
||||
psycogreen
|
||||
gevent==23.9.0
|
||||
gevent==24.2.1
|
||||
gunicorn
|
||||
psycopg2-binary
|
||||
whitenoise
|
||||
@@ -35,8 +35,8 @@ python-json-logger
|
||||
structlog
|
||||
|
||||
# Celery
|
||||
celery==5.2.7
|
||||
redis==4.5.4
|
||||
celery==5.4.0
|
||||
redis==5.0.8
|
||||
|
||||
# Testing
|
||||
Faker
|
||||
|
||||
@@ -14,11 +14,9 @@ asgiref==3.8.1
|
||||
# django-cors-headers
|
||||
asttokens==2.4.1
|
||||
# via stack-data
|
||||
async-timeout==4.0.3
|
||||
# via redis
|
||||
beautifulsoup4==4.12.3
|
||||
# via -r ./requirements.in
|
||||
billiard==3.6.4.0
|
||||
billiard==4.2.0
|
||||
# via celery
|
||||
black==24.8.0
|
||||
# via -r ./requirements.in
|
||||
@@ -34,7 +32,7 @@ bump2version==1.0.1
|
||||
# via bumpversion
|
||||
bumpversion==0.6.0
|
||||
# via -r ./requirements.in
|
||||
celery==5.2.7
|
||||
celery==5.4.0
|
||||
# via -r ./requirements.in
|
||||
certifi==2024.7.4
|
||||
# via
|
||||
@@ -161,11 +159,11 @@ filelock==3.15.4
|
||||
# via virtualenv
|
||||
fs==2.4.16
|
||||
# via django-bakery
|
||||
gevent==23.9.0
|
||||
gevent==24.2.1
|
||||
# via -r ./requirements.in
|
||||
ghapi==1.0.5
|
||||
# via -r ./requirements.in
|
||||
greenlet==2.0.1
|
||||
greenlet==3.0.3
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
# gevent
|
||||
@@ -275,6 +273,7 @@ python-dateutil==2.9.0.post0
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
# botocore
|
||||
# celery
|
||||
# faker
|
||||
python-dotenv==1.0.1
|
||||
# via environs
|
||||
@@ -285,15 +284,13 @@ python-json-logger==2.0.7
|
||||
python3-openid==3.2.0
|
||||
# via django-allauth
|
||||
pytz==2024.1
|
||||
# via
|
||||
# celery
|
||||
# django-oauth-toolkit
|
||||
# via django-oauth-toolkit
|
||||
pyyaml==6.0.2
|
||||
# via
|
||||
# pre-commit
|
||||
# python-frontmatter
|
||||
# responses
|
||||
redis==4.5.4
|
||||
redis==5.0.8
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
# django-redis
|
||||
@@ -341,6 +338,8 @@ typing-extensions==4.12.2
|
||||
# ipython
|
||||
# jwcrypto
|
||||
# minio
|
||||
tzdata==2024.1
|
||||
# via celery
|
||||
urllib3==1.26.19
|
||||
# via
|
||||
# botocore
|
||||
|
||||
Reference in New Issue
Block a user