Operations Apps Overview
Operations apps handle site maintenance, background task processing, and operational automation for your Django-CFG projects.
Maintenance App
Simple Cloudflare site maintenance management using Page Rules
- π Multi-Site Management - Manage multiple Cloudflare sites
- β‘ Page Rules Integration - Works with Cloudflare Free plan
- π Bulk Operations - Enable/disable maintenance for multiple sites
- π Clean Admin Interface - Unfold styled admin interface
- π± CLI Management - Command-line automation tools
Key Features
# Simple maintenance control
from django_cfg.apps.maintenance import MaintenanceService
service = MaintenanceService(site)
service.enable_maintenance("Database upgrade")
service.disable_maintenance()Whatβs New (Simplified)
- β Page Rules instead of complex Workers
- β 4 Models instead of 8+ models
- β Cloudflare Free plan compatible
- β KISS principle - Keep It Simple, Stupid
Tasks App
Asynchronous task processing with Django-RQ
- β‘ Background Jobs - Process tasks asynchronously
- π Retry Logic - Automatic retry with exponential backoff
- π Monitoring - Task status and performance tracking
- π― Priority Queues - Multiple priority levels
- π± Admin Interface - Task management via Django admin
Key Features
# Define and run background tasks
from django_cfg.apps.tasks import task
@task()
def send_email_task(user_id, subject, message):
# Process in background
pass
# Queue task
send_email_task.delay(user_id=123, subject="Hello", message="World")Best Practices
1. Use Maintenance for Site Operations
# Scheduled maintenance
service.enable_maintenance("Planned database migration - ETA 30min")
# Perform migration
service.disable_maintenance()2. Use Tasks for Heavy Processing
@task()
def process_large_dataset(dataset_id):
# Long-running data processing
pass3. Monitor Operations
# Check maintenance logs
logs = MaintenanceLog.objects.filter(status='failed')
# Check task status
from django_cfg.apps.tasks import TaskResult
failed_tasks = TaskResult.objects.filter(status='failed')See Also
Operations Apps
Operations Features:
- Maintenance Documentation - Complete maintenance app guide
- Tasks Documentation - Django-RQ task processing guide
- Built-in Apps Overview - All available apps
Background Processing:
- Django-RQ Integration - Background tasks framework
- Background Task Commands - Manage workers via CLI
- Production Config - Production task setup
Configuration & Setup
Getting Started:
- Configuration Guide - Enable operations apps
- First Project - Quick start tutorial
- Installation - Install Django-CFG
Advanced Configuration:
- Configuration Models - Operations config API
- Environment Detection - Environment-specific setup
- Cache Configuration - Redis setup for tasks
Tools & Deployment
CLI Tools:
- CLI Introduction - Command-line tools overview
- Core Commands - Essential operations commands
- Deployment - Production deployment
Guides:
- Troubleshooting - Common operations issues
- Production Best Practices - Operational patterns
Operations apps provide the backbone for reliable site operations and background processing! βοΈ