-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Hold connections and transactions for less time
Previously pg backend would hold connections/transactions during the execution of job handlers. So, e.g. if a job ran for 30 seconds, a transaction and its connection would be held for the entirety of those 30 seconds. The reason it was originally implemented this way is because originally the vision was to pass every job a `tx` that could be used throughout the job. If the job failed, its `tx` would be rolled back in neoq so that user would not have to handle rollbacks and connection handling themselves, were they to perform database operations in their jobs. But ultimately, that is a lot of hand-holding at the cost of a lot of resources, for a use case that is both unlikely and does not work as soon as the user's application and neoq tables are in different databases. This commit reverses that poor decision and opts to improve performance over giving users an ergonomic transaction handling API.
- Loading branch information
Showing
1 changed file
with
39 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters