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

✨ unify transaction creation and close db connection in same call for scripts #3360

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

danyx23
Copy link
Contributor

@danyx23 danyx23 commented Mar 16, 2024

This PR adds a new parameter for the transaction creation functions that closes the database connection. This is useful for scripts which usually want to run stuff in one transaction and would then like to have the DB connection closes. For the api router the option is not used of course as it is a long running process.

@danyx23 danyx23 marked this pull request as ready for review March 16, 2024 20:08
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from fe40423 to e559c80 Compare March 18, 2024 15:54
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch 2 times, most recently from f4fc806 to 4816ba2 Compare March 18, 2024 17:48
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 94180e6 to 445e098 Compare March 18, 2024 18:59
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from 9855cf0 to 402126d Compare March 18, 2024 18:59
@danyx23 danyx23 requested a review from ikesau March 18, 2024 19:01
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 445e098 to c968925 Compare March 19, 2024 16:02
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch 2 times, most recently from 57e6709 to b469dca Compare March 19, 2024 20:33
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from c968925 to 79b18e1 Compare March 20, 2024 10:05
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from b469dca to 96b52a3 Compare March 20, 2024 10:05
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 79b18e1 to 73526be Compare March 20, 2024 20:31
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from 96b52a3 to 1406f03 Compare March 20, 2024 20:32
Copy link
Member

@ikesau ikesau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this pattern. Makes connection handling far more clear!

Just clicked around the admin for 2 minutes to test... seems good!

@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 73526be to 1be5ef4 Compare March 21, 2024 22:22
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from 1406f03 to b444008 Compare March 21, 2024 22:22
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 1be5ef4 to f8026fa Compare March 23, 2024 15:34
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from b444008 to 25902dd Compare March 23, 2024 15:34
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from f8026fa to 65f7d9d Compare March 25, 2024 11:26
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from 25902dd to 3631bdb Compare March 25, 2024 11:26
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 65f7d9d to 24084b8 Compare March 26, 2024 11:45
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from 3631bdb to 7dc065f Compare March 26, 2024 11:45
@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 24084b8 to 299207d Compare March 26, 2024 13:08
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from 7dc065f to 77a4d15 Compare March 26, 2024 13:08
Copy link
Contributor Author

danyx23 commented Mar 26, 2024

Merge activity

  • Mar 26, 10:04 AM EDT: @danyx23 started a stack merge that includes this pull request via Graphite.
  • Mar 26, 10:25 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 26, 10:26 AM EDT: @danyx23 merged this pull request with Graphite.

@danyx23 danyx23 force-pushed the db-cleanup-after-big-db-refactor branch from 299207d to 63d6d63 Compare March 26, 2024 14:23
Base automatically changed from db-cleanup-after-big-db-refactor to master March 26, 2024 14:24
@danyx23 danyx23 force-pushed the db-autocleanup-for-scripts branch from 77a4d15 to cc52aec Compare March 26, 2024 14:25
@danyx23 danyx23 merged commit 8501105 into master Mar 26, 2024
16 of 20 checks passed
@danyx23 danyx23 deleted the db-autocleanup-for-scripts branch March 26, 2024 14:26
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

Successfully merging this pull request may close these issues.

2 participants