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

Re use Panoptes client across requests #167

Open
camallen opened this issue Jun 13, 2019 · 0 comments
Open

Re use Panoptes client across requests #167

camallen opened this issue Jun 13, 2019 · 0 comments

Comments

@camallen
Copy link
Contributor

Calling Panoptes.connect for each request will replace the internal client instance and run through oauth setup and token generation for each request.

Normal practice in multithreaded env would be to setup a connection pooler at boot that requests use to checkout a client instance for use. A forking server could use a single shared instance as long as the client instance is setup after the fork.

It seems flask allows the use of request contexts but that requires connecting and discarding the client on each request, no better than what currently exists frankly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant