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

Review the way of interaction with the database #34

Open
kolayne opened this issue Mar 16, 2021 · 0 comments
Open

Review the way of interaction with the database #34

kolayne opened this issue Mar 16, 2021 · 0 comments
Labels
k-maint Everything works correctly, but the code quality suffers p-medium Important, but secondary

Comments

@kolayne
Copy link
Owner

kolayne commented Mar 16, 2021

I don't like the bot creates a new connection to the database each time it needs something from there. I guess, we should use a connection pool instead. Should search for tips from psycopg developers or look how others do this

@kolayne kolayne added the p-medium Important, but secondary label Mar 16, 2021
kolayne added a commit that referenced this issue May 31, 2021
Updated core module files to use OOP. This is to make interaction of front-end and back-end simpler (by using methods, which associated with a particular object, instead of using functions, which are free and aren't associated with anything) and extend potential use cases (for example, with classes it would be much easier to have multiple bots running in the same application). From now on, `core` doesn't have a config file, all the data must be provided when initializing classes (there'll be more info, see #23).
At the moment the worst parts are db_connector (not going to fix it soon, see #34) and invitations, which must be split into back-end and front-end parts (not sure, how soon this is going to happen).

WARNING: this code is not working, because the front-end part was not updated yet to comply with the back-end's updates (made in this commit)
@kolayne kolayne added the k-maint Everything works correctly, but the code quality suffers label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k-maint Everything works correctly, but the code quality suffers p-medium Important, but secondary
Projects
None yet
Development

No branches or pull requests

1 participant