mirror of
https://github.com/makeplane/plane.git
synced 2026-01-31 02:39:32 -06:00
[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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user