Created
March 15, 2024 18:48
-
-
Save chrismeyersfsu/af5a12bfab25697a4a31c4c513938e10 to your computer and use it in GitHub Desktop.
lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from awx.main.utils.pglock import advisory_lock | |
def locktest(): | |
with advisory_lock('inspect_execution_and_hop_nodes_lock', wait=False): | |
print("We got the lock!") | |
print("Done") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment