Compare commits

...

3 Commits

Author SHA1 Message Date
Joel Falknau
49a271a99f
update pre-commit 2025-04-07 14:04:06 +10:00
Joel Falknau
af87da876b
Celery 5.5 + shutdown timeouts 2025-04-07 14:01:33 +10:00
Joel Falknau
57b3841293
internal network port only 2025-04-07 13:57:57 +10:00
4 changed files with 11 additions and 7 deletions

View File

@ -25,13 +25,13 @@ exclude: |
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.0
rev: v0.11.4
hooks:
# Run the linter, and only the linter
- id: ruff
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.23.1
rev: 1.24.0
hooks:
- id: django-upgrade
args: [--target-version=5.1]
@ -73,7 +73,7 @@ repos:
- id: check-executables-have-shebangs
- id: end-of-file-fixer
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.2.0
rev: 3.2.1
hooks:
- id: editorconfig-checker
- repo: https://github.com/igorshubovych/markdownlint-cli
@ -97,6 +97,6 @@ repos:
hooks:
- id: tox-ini-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24
rev: v0.24.1
hooks:
- id: validate-pyproject

View File

@ -14,6 +14,10 @@ app = Celery('myauth')
# Celery startup if it is unavailable.
app.conf.broker_connection_retry_on_startup = True
# Set a hard task execution time of 5 minutes before celery will cold restart
app.conf.worker_soft_shutdown_timeout = 300
app.conf.worker_enable_soft_shutdown_on_idle = True
# Using a string here means the worker don't have to serialize
# the configuration object to child processes.
app.config_from_object('django.conf:settings')

View File

@ -89,8 +89,8 @@ services:
container_name: allianceauth_gunicorn
<<: [*allianceauth-base]
entrypoint: ["gunicorn", "myauth.wsgi", "--bind=0.0.0.0:8000", "--workers=3", "--timeout=120", "--max-requests=500", "--max-requests-jitter=50"]
ports:
- 8000:8000
expose:
- 8000
allianceauth_beat:
container_name: allianceauth_worker_beat

View File

@ -40,7 +40,7 @@ dynamic = [
dependencies = [
"bcrypt",
"beautifulsoup4",
"celery>=5.4,<6",
"celery>=5.5,<6",
"celery-once>=3.0.1",
"django>=5.1,<5.2",
"django-bootstrap-form",