Compare commits
No commits in common. "a6a644d801f1a446f5b2317337282ade710bc09b" and "90aeac18070702bec8dca86ff0d77f073a83ca38" have entirely different histories.
a6a644d801
...
90aeac1807
@ -1,4 +0,0 @@
|
|||||||
from .celery import app as celery_app
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ('celery_app',)
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
import os
|
|
||||||
from celery import Celery
|
|
||||||
|
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'OneCprogsite.settings')
|
|
||||||
|
|
||||||
app = Celery('OneCprogsite')
|
|
||||||
app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
||||||
app.autodiscover_tasks()
|
|
||||||
@ -70,16 +70,9 @@ if not DEBUG:
|
|||||||
LANGUAGE_COOKIE_HTTPONLY = True
|
LANGUAGE_COOKIE_HTTPONLY = True
|
||||||
LANGUAGE_COOKIE_SAMESITE = 'Lax'
|
LANGUAGE_COOKIE_SAMESITE = 'Lax'
|
||||||
|
|
||||||
# Celery
|
# Redis
|
||||||
CELERY_BROKER_URL = os.environ.get('REDIS_URL', 'redis://redis:6379/0')
|
CELERY_BROKER_URL = os.environ.get('CELERY_BROKER_URL', 'redis://localhost:6379/0')
|
||||||
CELERY_RESULT_BACKEND = os.environ.get('REDIS_URL', 'redis://redis:6379/0')
|
CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND', 'redis://localhost:6379/0')
|
||||||
CELERY_ACCEPT_CONTENT = ['json']
|
|
||||||
CELERY_TASK_SERIALIZER = 'json'
|
|
||||||
CELERY_RESULT_SERIALIZER = 'json'
|
|
||||||
CELERY_TIMEZONE = 'Europe/Moscow'
|
|
||||||
CELERY_TASK_TRACK_STARTED = True
|
|
||||||
CELERY_TASK_TIME_LIMIT = 30 * 60
|
|
||||||
CELERY_TASK_SOFT_TIME_LIMIT = 20 * 60
|
|
||||||
|
|
||||||
CSRF_TRUSTED_ORIGINS = [
|
CSRF_TRUSTED_ORIGINS = [
|
||||||
'https://nikdizell.ru',
|
'https://nikdizell.ru',
|
||||||
@ -107,7 +100,6 @@ INSTALLED_APPS = [
|
|||||||
'turnstile',
|
'turnstile',
|
||||||
'products',
|
'products',
|
||||||
'background_task',
|
'background_task',
|
||||||
'django_celery_results',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user