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

Add support for lazy connections #103

Open
Tracked by #116
RobertCraigie opened this issue Nov 6, 2021 · 1 comment
Open
Tracked by #116

Add support for lazy connections #103

RobertCraigie opened this issue Nov 6, 2021 · 1 comment
Labels
kind/improvement An improvement to existing feature and code. level/intermediate priority/high process/candidate Candidate for the next release
Projects
Milestone

Comments

@RobertCraigie
Copy link
Owner

Problem

Currently, defining multiple event handlers using a framework that doesn't support a callback like on_startup() is annoying as you have to check if the client is connected or not before making a query.

Suggested solution

Refactor the internal engine connection to be lazy, i.e. whenever a query is made, connect to the database before running the query.

@RobertCraigie RobertCraigie added the kind/improvement An improvement to existing feature and code. label Nov 6, 2021
@RobertCraigie RobertCraigie added this to To do in v1.0.0 via automation Nov 6, 2021
@RobertCraigie
Copy link
Owner Author

We need to take special care that concurrent queries do not create multiple connections.

@RobertCraigie RobertCraigie added the process/candidate Candidate for the next release label Dec 5, 2021
@RobertCraigie RobertCraigie added this to the v0.4.1 milestone Dec 5, 2021
@RobertCraigie RobertCraigie removed the process/candidate Candidate for the next release label Dec 8, 2021
@RobertCraigie RobertCraigie removed this from the v0.4.1 milestone Dec 8, 2021
@RobertCraigie RobertCraigie added kind/improvement An improvement to existing feature and code. process/candidate Candidate for the next release and removed kind/improvement An improvement to existing feature and code. labels Jan 15, 2022
@RobertCraigie RobertCraigie added this to the v0.5.0 milestone Jan 15, 2022
@RobertCraigie RobertCraigie modified the milestones: v0.5.0, v0.6.0 Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. level/intermediate priority/high process/candidate Candidate for the next release
Projects
Status: Backlog
v1.0.0
To do
Development

No branches or pull requests

1 participant