Commit graph

8 commits

Author SHA1 Message Date
ed16a4fd3d Revert "Features:"
This reverts commit a31ce44dfc.
2025-05-09 04:31:48 +03:00
a31ce44dfc Features:
1) Add Celery shared_task decorator to `update_stock` method for asynchronous execution.

Fixes:
1) Replace direct `update_stock()` calls with `update_stock.delay()` to enable task queuing.

Extra:
1) Add missing import for `shared_task` in `core/vendors/__init__.py`.
2025-05-09 04:29:07 +03:00
0a9a6dfd6c Features:
1) Add error handling with logger and custom error message for holiday API requests;

Fixes:
(none);

Extra:
1) Replace direct API response raising with try-except block for better robustness and logging;
2025-05-09 04:17:47 +03:00
87e124f614 Handle errors in vendor stock updates and inactive vendors
Add error handling during the stock update process to log and skip problematic vendors without halting execution. Additionally, ensure `get_vendor_instance` only returns active vendors, raising an error if the vendor is inactive. This improves system resilience and data integrity.
2025-05-07 03:15:23 +03:00
12ccd04943 Update API version to 2.6.0 and reformat migration files
Updated the API version from 2.5.0 to 2.6.0 in the DRF settings for consistency across configurations. Reformatted migration files for better readability, ensuring consistency in code style and improving maintainability. These changes do not alter functionality but enhance clarity and documentation.
2025-05-06 19:19:49 +03:00
7d6eb8a27a Refine API key validation in task configuration.
Previously, an "example key" could mistakenly pass the check, leading to potential misuse. This update ensures features are disabled if the API key is invalid or set to default.
2025-05-06 17:57:35 +03:00
96c3fe23b0 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.
2025-05-05 17:16:57 +03:00
68febcdb08 Initial Commit 2025-04-29 22:40:30 +03:00