Refactor Zasilkovna client, update imports and cleanup
Refactored the Zasilkovna SOAP client to use a singleton pattern with caching and lazy loading, improving reliability and startup performance. Updated invoice PDF generation to import WeasyPrint lazily, preventing startup failures on systems missing dependencies. Cleaned up unused imports and code in several frontend components, removed unused state and variables, and adjusted Docker frontend port mapping. Also updated Django migration files to reflect a new generation timestamp.
This commit is contained in:
@@ -5,6 +5,10 @@ from django.apps import apps
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
# -- CLEANUP TASKS --
|
||||
|
||||
# Delete expired/cancelled orders (older than 24 hours)
|
||||
@shared_task
|
||||
def delete_expired_orders():
|
||||
Order = apps.get_model('commerce', 'Order')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user