mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-24 23:11:08 -05:00
Add secret management guide, client-side performance monitoring, and search accessibility enhancements
- Introduced a comprehensive Secret Management Guide detailing best practices, secret classification, development setup, production management, rotation procedures, and emergency protocols. - Implemented a client-side performance monitoring script to track various metrics including page load performance, paint metrics, layout shifts, and memory usage. - Enhanced search accessibility with keyboard navigation support for search results, ensuring compliance with WCAG standards and improving user experience.
This commit is contained in:
@@ -6,18 +6,25 @@ This module sets up Celery for background task processing including:
|
||||
- Cache warming
|
||||
- Analytics processing
|
||||
- Email notifications
|
||||
|
||||
Celery uses the same Django settings module as the main application,
|
||||
which can be configured via DJANGO_SETTINGS_MODULE environment variable.
|
||||
"""
|
||||
|
||||
import os
|
||||
from celery import Celery
|
||||
from decouple import config
|
||||
|
||||
# Set the default Django settings module for the 'celery' program.
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.django.local")
|
||||
# Use the same Django settings module as the main application
|
||||
# Default to production (matching WSGI/ASGI), can be overridden via environment
|
||||
# Honor existing DJANGO_SETTINGS_MODULE if already set
|
||||
if "DJANGO_SETTINGS_MODULE" not in os.environ:
|
||||
os.environ["DJANGO_SETTINGS_MODULE"] = "config.django.production"
|
||||
|
||||
app = Celery("thrillwiki")
|
||||
|
||||
# Get Redis URL from environment variable with fallback
|
||||
REDIS_URL = os.environ.get("REDIS_URL", "redis://localhost:6379/1")
|
||||
REDIS_URL = config("REDIS_URL", default="redis://localhost:6379/1")
|
||||
|
||||
# Celery Configuration - set directly without loading from Django settings first
|
||||
app.conf.update(
|
||||
|
||||
Reference in New Issue
Block a user