[WEB-4484]chore: streamline issue saving process with advisory locks for sequence management (#7396)
* chore: streamline issue saving process with advisory locks for sequence management * fix: update advisory lock usage in issue model for improved concurrency management
This commit is contained in:
parent
17c90a9d93
commit
c8dab1cc9c
1 changed files with 2 additions and 1 deletions
|
|
@ -215,7 +215,8 @@ class Issue(ProjectBaseModel):
|
|||
|
||||
with connection.cursor() as cursor:
|
||||
# Get an exclusive lock using the project ID as the lock key
|
||||
cursor.execute("SELECT pg_advisory_xact_lock(%s)", [lock_key])
|
||||
cursor.execute("SELECT pg_advisory_lock(%s)", [lock_key])
|
||||
|
||||
try:
|
||||
# Get the last sequence for the project
|
||||
last_sequence = IssueSequence.objects.filter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue