Update promotion handling and logging levels
Change promotions to inactive instead of deleting them to maintain data integrity. Adjust Celery logging levels to be DEBUG/INFO based on the DEBUG setting, improving log granularity during development and clarity in production.
This commit is contained in:
parent
4e04caf91d
commit
96c3fe23b0
2 changed files with 3 additions and 3 deletions
|
|
@ -159,7 +159,7 @@ def process_promotions() -> tuple[bool, str]:
|
|||
if not config.ABSTRACT_API_KEY:
|
||||
return False, "Abstract features disabled."
|
||||
|
||||
Promotion.objects.all().delete()
|
||||
Promotion.objects.all().update(is_active=False)
|
||||
|
||||
holiday_data = None
|
||||
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ LOGGING = {
|
|||
},
|
||||
"celery.app.trace": {
|
||||
"handlers": ["console_debug" if DEBUG else "console_production"], # noqa: F405
|
||||
"level": "ERROR",
|
||||
"level": "DEBUG" if DEBUG else "INFO",
|
||||
"propagate": False,
|
||||
},
|
||||
"celery.worker.strategy": {
|
||||
"handlers": ["console_debug" if DEBUG else "console_production"], # noqa: F405
|
||||
"level": "ERROR",
|
||||
"level": "DEBUG" if DEBUG else "INFO",
|
||||
"propagate": False,
|
||||
},
|
||||
"elastic_transport.transport": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue