Fixed last release

This commit is contained in:
Ultradesu
2025-07-20 22:50:22 +03:00
parent 42a923799b
commit dc6d170f08
6 changed files with 448 additions and 36 deletions

View File

@@ -14,10 +14,27 @@ app.conf.beat_schedule = {
'task': 'sync_all_servers',
'schedule': crontab(minute='*'),
},
'cleanup_old_task_logs': {
'task': 'cleanup_task_logs',
'schedule': crontab(hour=2, minute=0), # Daily at 2 AM
},
}
app.config_from_object('django.conf:settings', namespace='CELERY')
# Additional celery settings for better logging and performance
app.conf.update(
# Keep detailed results for debugging
result_expires=3600, # 1 hour
task_always_eager=False,
task_eager_propagates=True,
# Improve task tracking
task_track_started=True,
task_send_sent_event=True,
# Clean up settings
result_backend_cleanup_interval=300, # Clean up every 5 minutes
)
app.autodiscover_tasks()