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

Adopt a common pattern for commiting database changes #549

Open
grahamalama opened this issue Feb 15, 2023 · 2 comments
Open

Adopt a common pattern for commiting database changes #549

grahamalama opened this issue Feb 15, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@grahamalama
Copy link
Contributor

Right now, we commit database transactions in many different places:

  • crud.py
  • app.py
  • various scripts

We should adopt a common pattern for committing session data so that it all happens in one place.

@grahamalama grahamalama added the enhancement New feature or request label Feb 15, 2023
@leplatrem
Copy link
Contributor

I would recommend:

  • manual commit/rollbacks only in CLI scripts
  • a middleware that commits if the response is 2XX and aborts if > 3XX
    And nowhere else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants