From 8b571dac9379e872b4a9f8601b9e1d172e873ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Helle=C5=9Ben?= Date: Mon, 23 Mar 2026 19:47:50 +0100 Subject: [PATCH 1/2] Include celery-types --- config/celery.py | 28 ++++++++++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 29 insertions(+) diff --git a/config/celery.py b/config/celery.py index 68e4383..129ab98 100644 --- a/config/celery.py +++ b/config/celery.py @@ -1,6 +1,34 @@ import os from celery import Celery +from celery import Signature +from celery.app.task import Task +from celery.contrib.abortable import AbortableAsyncResult +from celery.contrib.abortable import AbortableTask +from celery.contrib.django.task import DjangoTask +from celery.local import class_property +from celery.result import AsyncResult +from celery.utils.objects import FallbackContext + +classes = [ + Celery, + Task, + DjangoTask, + AbortableTask, + AsyncResult, + AbortableAsyncResult, + Signature, + FallbackContext, + class_property, +] + +for cls in classes: + setattr( # noqa: B010 + cls, + "__class_getitem__", + classmethod(lambda cls, *args, **kwargs: cls), # noqa: ARG005 + ) + # Set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") diff --git a/pyproject.toml b/pyproject.toml index 0b8e299..d681dc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,7 @@ dependencies = [ [dependency-groups] dev = [ + "celery-types", "django-stubs", "djlint", "hypothesis[django]", From 302ef16975407a4439cd1d5552047c317488fc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Helle=C5=9Ben?= Date: Mon, 23 Mar 2026 20:54:42 +0100 Subject: [PATCH 2/2] Add PostgreSQL configuration to .env.example --- .env.example | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.env.example b/.env.example index e1a36f1..7ccfd56 100644 --- a/.env.example +++ b/.env.example @@ -31,7 +31,17 @@ EMAIL_USE_SSL=False # Connection timeout in seconds EMAIL_TIMEOUT=10 +# PostgreSQL Configuration +POSTGRES_PASSWORD= +POSTGRES_USER=ttvdrops +POSTGRES_DB=ttvdrops + +# PostgreSQL Host and Port +POSTGRES_HOST=/run/postgresql + +# Note: Changed from 5432 to 6432 to use PgBouncer +POSTGRES_PORT=5432 # Where to store Twitch API responses TTVDROPS_IMPORTED_DIR=/mnt/fourteen/Data/Responses/imported TTVDROPS_BROKEN_DIR=/mnt/fourteen/Data/Responses/broken