settings for django celery beat

This commit is contained in:
dekzter 2025-03-31 10:04:05 -04:00
parent 2995d2c456
commit 6175d910f4

View file

@ -35,10 +35,9 @@ INSTALLED_APPS = [
'rest_framework',
'corsheaders',
'django_filters',
'django_celery_beat',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
@ -164,6 +163,10 @@ CELERY_BROKER_TRANSPORT_OPTIONS = {
'visibility_timeout': 3600, # Time in seconds that a task remains invisible during retries
}
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers.DatabaseScheduler"
CELERY_BEAT_SCHEDULE = {
'fetch-channel-statuses': {
'task': 'apps.proxy.tasks.fetch_channel_stats',