✅ Fixed Critical Issues: - Fixed dynamic QR code short URL redirect functionality - Resolved data consistency issues with multiple LinkPageManager instances - Fixed worker concurrency problems in Gunicorn configuration 🎨 UI/UX Enhancements: - Separated public page from admin statistics view - Created clean public_page.html for QR code users (no admin info) - Added comprehensive statistics_page.html for admin analytics - Enhanced dashboard with separate 'Manage' and 'Stats' buttons - Improved navigation flow throughout the application 🔧 Technical Improvements: - Added URLShortener instance reloading for data consistency - Reduced Gunicorn workers to 1 to prevent file conflicts - Increased timeout to 60s for better performance - Enhanced debug logging for troubleshooting - Added proper error handling and 404 responses 📁 New Files: - app/templates/public_page.html - Clean public interface - app/templates/statistics_page.html - Admin analytics dashboard �� Modified Files: - app/routes/main.py - Added /stats route, improved short URL handling - app/templates/edit_links.html - Added Statistics button - app/templates/index.html - Added Stats button for QR codes - app/utils/link_manager.py - Enhanced data reloading - app/utils/url_shortener.py - Added debug logging - gunicorn.conf.py - Optimized worker configuration This update provides a professional separation between public content and admin functionality while ensuring reliable short URL operation.
39 lines
947 B
Python
Executable File
39 lines
947 B
Python
Executable File
# Gunicorn configuration file
|
|
# Documentation: https://docs.gunicorn.org/en/stable/configure.html
|
|
|
|
# Server socket
|
|
bind = "0.0.0.0:5000"
|
|
backlog = 2048
|
|
|
|
# Worker processes
|
|
workers = 1 # Reduced to 1 to avoid file concurrency issues
|
|
worker_class = "sync"
|
|
worker_connections = 1000
|
|
timeout = 60 # Increased timeout to handle potentially slow operations
|
|
keepalive = 2
|
|
|
|
# Restart workers after this many requests, to prevent memory leaks
|
|
max_requests = 1000
|
|
max_requests_jitter = 50
|
|
|
|
# Logging
|
|
accesslog = "-"
|
|
errorlog = "-"
|
|
loglevel = "info"
|
|
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
|
|
|
|
# Process naming
|
|
proc_name = "qr-code-manager"
|
|
|
|
# Server mechanics
|
|
preload_app = True
|
|
pidfile = "/tmp/gunicorn.pid"
|
|
# Comment out user/group for Docker deployment
|
|
# user = "app"
|
|
# group = "app"
|
|
tmp_upload_dir = None
|
|
|
|
# SSL (uncomment and configure for HTTPS)
|
|
# keyfile = "/path/to/keyfile"
|
|
# certfile = "/path/to/certfile"
|