Skip to content

Commit 2ff7ce1

Browse files
committed
chore: remove lock
1 parent a86fb57 commit 2ff7ce1

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎backend/application/core/services/potential_duplicates.py‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@ class DuplicateCandidate(NamedTuple):
3737
DuplicateTypes = dict[tuple[int, int], str]
3838

3939

40-
# The lock serializes all recalculations, so that concurrent imports cannot write
41-
# potential duplicates for the same observations at the same time. If the lock cannot be
42-
# acquired, Huey retries the task later. The retries have to be high enough to bridge
43-
# the recalculations of the other tasks waiting for the lock.
44-
@on_commit_task(retries=5, retry_delay=60)
45-
@lock_task("find_potential_duplicates_lock")
40+
@on_commit_task()
4641
def find_potential_duplicates(product: Product, branch: Optional[Branch], service: Optional[Service]) -> None:
4742
try:
4843
observations = Observation.objects.filter(product=product, branch=branch, origin_service=service)

0 commit comments

Comments
 (0)