tuning job log views and deep scan archive processing.

This commit is contained in:
Bryan Van Deusen
2026-02-02 18:48:01 -05:00
parent 042a69f9c3
commit 09883960d4
9 changed files with 1078 additions and 103 deletions
+17 -1
View File
@@ -57,8 +57,20 @@ def make_celery(app=None):
worker_prefetch_multiplier=1, # One task at a time per worker process
# Task routing - separate queues for different task types
# Scheduler handles: maintenance (periodic tasks) + scan (directory scans)
# Worker handles: import, thumbnail, sidecar, default
task_routes={
'app.tasks.scan.*': {'queue': 'scan'},
# Scan tasks - handled by scheduler
'app.tasks.scan.scan_directory': {'queue': 'scan'},
'app.tasks.scan.deep_scan_directory': {'queue': 'scan'},
# Maintenance tasks - handled by scheduler (periodic/lightweight)
'app.tasks.scan.recover_interrupted_tasks': {'queue': 'maintenance'},
'app.tasks.scan.cleanup_old_tasks': {'queue': 'maintenance'},
'app.tasks.scan.update_system_stats': {'queue': 'maintenance'},
'app.tasks.scan.update_batch_stats': {'queue': 'maintenance'},
# Import tasks - handled by worker (heavy processing)
'app.tasks.import_file.*': {'queue': 'import'},
'app.tasks.thumbnail.*': {'queue': 'thumbnail'},
'app.tasks.sidecar.*': {'queue': 'sidecar'},
@@ -94,6 +106,10 @@ def make_celery(app=None):
'schedule': 86400, # Once per day
'args': (7,), # Keep tasks for 7 days
},
'update-system-stats': {
'task': 'app.tasks.scan.update_system_stats',
'schedule': 21600, # Every 6 hours
},
},
)