Skip to content

add async context to acquire advisory locks#1208

Open
nilbacardit26 wants to merge 7 commits into
masterfrom
advisory-global-lock-pg
Open

add async context to acquire advisory locks#1208
nilbacardit26 wants to merge 7 commits into
masterfrom
advisory-global-lock-pg

Conversation

@nilbacardit26

Copy link
Copy Markdown
Contributor

We need to lock an object to prevent concurrent modifications by other transactions. I've added this piece of code to use pessimistic advisory locking, using an async context manager.

@bloodbare bloodbare left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As its not a core DB functionallity used on guillotina, maybe can be an external utility. G is designed to not need the locks.

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.

2 participants