celery & attributes list by product

This commit is contained in:
2025-07-19 10:41:03 +03:30
parent a6b29ad28d
commit dc1e79c684
7 changed files with 97 additions and 8 deletions

View File

@@ -86,7 +86,9 @@ INSTALLED_APPS = [
'apps.product.apps.ProductConfig',
'rest_captcha',
'captcha',
'drf_yasg'
'drf_yasg',
"django_celery_results",
"django_celery_beat",
]
MIDDLEWARE = [
@@ -162,6 +164,17 @@ SWAGGER_SETTINGS = {
"DEFAULT_AUTO_SCHEMA_CLASS": "drf_yasg.inspectors.SwaggerAutoSchema"
}
CELERY_BROKER_URL = "redis://:ydnW4hwzuDRYcTX3FWCHgQ1f@apo.liara.cloud:33740/0" # Requires Redis server
accept_content = ["application/json"]
result_serializer = "json"
task_serializer = "json"
timezone = "UTC"
CELERY_RESULT_BACKEND = "redis://:ydnW4hwzuDRYcTX3FWCHgQ1f@apo.liara.cloud:33740/0"
CELERY_CACHE_BACKEND = 'default'
# Celery Beat settings
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"
LOGIN_URL = 'rest_framework:login'
LOGOUT_URL = 'rest_framework:logout'