Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backlog issues (needs breaking down) #41

Open
2 tasks
shanirub opened this issue Nov 18, 2024 · 0 comments
Open
2 tasks

backlog issues (needs breaking down) #41

shanirub opened this issue Nov 18, 2024 · 0 comments

Comments

@shanirub
Copy link
Owner

shanirub commented Nov 18, 2024

  • Add integration tests to orders in model level (total sum of order changes when adding/removing/updating order items)
  • current Order model doesn't contain a "total_price" attribute. whenever this value is needed, it is calculated using a helper method in OrderManager. should revisit this and implement something with cached values and signals that trigger calculation.
    when readdressing this, consider:
    Caching: Use total_price as a field but update it on OrderItem changes.
    Task Queues: Explore Celery for async operations when dealing with high traffic or complex calculations.
    Database Triggers: Add database-level triggers for consistent total updates without application overhead.
    Atomic Transactions: Ensure total updates are handled atomically, especially for payment and inventory workflows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant