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! โ๏ธ