On 23/09/2021 17.12, Sencer Hamarat wrote:
Thanks for reply,
Afterwards, I figured out it was like in your comment.
Good to hear and thanks for sharing the solution.
Kind regards,
Kasper Laudrup
--
You received this message because you are subscribed to the Google Groups "Django
users" gr
Thanks for reply,
Afterwards, I figured out it was like in your comment.
Solution:
lock_id = "non_unique_lock"
with advisory_lock(lock_id, wait=False) as acquired:
if acquired:
# things to do
else:
raise Exception() # or whatever you want.
Regards,
Sencer HAMARAT
On
On 22/09/2021 17.18, Sencer Hamarat wrote:
Say, I have code block lie this:
lock_id = "non_unique_lock"
with advisory_lock(lock_id, wait=True) as acquired:
# things to do
While one process has the lock, when the secondary process runs the same
code block, the secon
Say, I have code block lie this:
lock_id = "non_unique_lock"
with advisory_lock(lock_id, wait=True) as acquired:
# things to do
While one process has the lock, when the secondary process runs the same
code block, the secondary process must raise an exception if it can't
acquire th
4 matches
Mail list logo