RepostCheckerBot icon indicating copy to clipboard operation
RepostCheckerBot copied to clipboard

Do we really need to open a new db connection every time we insert a new post?

Open KilianB opened this issue 5 years ago • 4 comments

If sqllite for py isn't entirely different than every other db lib I have worked with:

https://github.com/xXAligatorXx/RepostCheckerBot/blob/b11b397baed745df82ae439aacba0ff9bd430af8/database.py#L709-L719

We can reuse the connection, and it definitely should be closed once we are done with it. Closing the cursor is NOT! enough and you'll eventually run out of allowed connections we can establish

KilianB avatar Apr 21 '19 23:04 KilianB