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

Pinning/add use secondary db context manager #1

Closed

Conversation

bardiharborow
Copy link
Owner

@bardiharborow bardiharborow commented Jun 28, 2022

No description provided.

This commit adds support for nested use of the UsePrimaryDB context manager. If a new instance of the context manager was created at each level we could use instance variables to store the pinning state but the default instance is generally used directly. Instead, we store a stack of pinning values locally in the thread and pop each value as we unwind the stack.
This commit adds a UseSecondaryDB context manager which unpins within a block.
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

Successfully merging this pull request may close these issues.

1 participant