-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove stale promises from the DB on app startup
Before this commit, promises were only removed from the DB once they were consumed. Therefore, it was possible to end up with "stale" promises lingering in the promise table of the DB, if the promise was created and persisted, but the app got closed before they could be consumed. These promises would linger forever because there was no way to consume them anymore (resolvers map was empty) and would therefore just take up space in the table for no reason. This commit fixes this by truncating the promise table on each restart of the application. We can truncate the whole table as we know that all of the promises still in the DB at app start-up are unconsumable, as the resolvers map will be empty at this point.
- Loading branch information
1 parent
4ab6f16
commit 44e052e
Showing
5 changed files
with
24 additions
and
0 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
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
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
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
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