diff --git a/pipeline/engine/models/core.py b/pipeline/engine/models/core.py index 06aacab09..51d4ad67a 100644 --- a/pipeline/engine/models/core.py +++ b/pipeline/engine/models/core.py @@ -496,11 +496,9 @@ def destroy_and_wake_up_parent(self, destination_id): data_service.set_object(self._context_key(), self.top_pipeline.context) data_service.set_object(self._data_key(), self.top_pipeline.data) - with transaction.atomic(): - parent = self.__class__.objects.select_for_update().get(id=self.parent_id) - parent.ack_num += 1 - parent.save() - + self.__class__.objects.filter(id=self.parent_id).update( + ack_num=models.F("ack_num") + 1 + ) can_wake_up = False with transaction.atomic():