use celerybeat
This commit is contained in:
@@ -8,6 +8,16 @@ app = Celery('telegram_bots')
|
||||
|
||||
app.config_from_object({
|
||||
'broker_url': 'redis://127.0.0.1:6379/1',
|
||||
'result_backend': 'django-db',
|
||||
'beat_scheduler': 'django_celery_beat.schedulers:DatabaseScheduler',
|
||||
'worker_concurrency': 4,
|
||||
'ONCE': {
|
||||
'backend': 'celery_once.backends.Redis',
|
||||
'settings': {
|
||||
'url': 'redis://localhost:6379/0',
|
||||
'default_timeout': 60 * 60,
|
||||
}
|
||||
}
|
||||
})
|
||||
app.autodiscover_tasks()
|
||||
|
||||
|
@@ -20,6 +20,8 @@ INSTALLED_APPS = [
|
||||
'django_extensions',
|
||||
'bootstrap4',
|
||||
'djconfig',
|
||||
'django_celery_results',
|
||||
'django_celery_beat',
|
||||
'config.suit_config.SuitConfig',
|
||||
|
||||
'django.contrib.admin',
|
||||
@@ -73,7 +75,7 @@ DATABASES = {
|
||||
DATABASES['default']['ATOMIC_REQUESTS'] = True
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
TIME_ZONE = 'UTC'
|
||||
TIME_ZONE = 'Europe/Moscow'
|
||||
USE_I18N = True
|
||||
USE_L10N = True
|
||||
USE_TZ = True
|
||||
|
Reference in New Issue
Block a user