Use celery tasks instead of systemd timers for periodic work; and add more tests
All checks were successful
Deploy to Server / deploy (push) Successful in 26s

This commit is contained in:
Joakim Hellsén 2026-04-08 03:23:18 +02:00
commit 66ea46cf23
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
25 changed files with 2133 additions and 104 deletions

View file

@ -1,7 +1,13 @@
# Django Configuration
# Set to False in production
# Environment variables for ttvdrops Django application
# Copy this file to `.env` and fill in the appropriate values before running the application.
# For local development, you can use the default values provided here, but make sure to change the secret key and Twitch API credentials for production use.
# Debug mode (set to False in production)
DEBUG=True
# Base URL used for absolute URL generation
BASE_URL=https://ttvdrops.lovinator.space
# Django Secret Key
# Generate a new secret key for production: python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
DJANGO_SECRET_KEY=your-secret-key-here
@ -11,6 +17,8 @@ DJANGO_SECRET_KEY=your-secret-key-here
# You can use either an app access token or user access token
TWITCH_CLIENT_ID=your-twitch-client-id
TWITCH_CLIENT_SECRET=your-twitch-client-secret
# Optional: if omitted, some commands can fetch an app access token using the client credentials
TWITCH_ACCESS_TOKEN=
# Email Configuration
# SMTP Host (examples below)
@ -42,10 +50,24 @@ POSTGRES_HOST=/run/postgresql
# Note: Changed from 5432 to 6432 to use PgBouncer
POSTGRES_PORT=5432
# Optional database connection tuning
# CONN_MAX_AGE=60
# CONN_HEALTH_CHECKS=True
# DB_CONNECT_TIMEOUT=10
# Use SQLite instead of PostgreSQL (useful for local development)
USE_SQLITE=False
# Where to store Twitch API responses
TTVDROPS_IMPORTED_DIR=/mnt/fourteen/Data/Responses/imported
# Where to store Twitch API responses that failed processing (e.g. due to missing fields or unrecognized formats)
TTVDROPS_BROKEN_DIR=/mnt/fourteen/Data/Responses/broken
# Redis Configuration
# Where to store Twitch API responses that are pending processing (e.g. waiting for a periodic task to process them)
TTVDROPS_PENDING_DIR=/mnt/fourteen/Data/Responses/pending
# Redis Configuration for caching and Celery
REDIS_URL_CACHE=unix:///var/run/redis/redis.sock?db=0
REDIS_URL_CELERY=unix:///var/run/redis/redis.sock?db=1