From 3743ac75472bab4fc70705627fa3adafc7a4697c Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Tue, 14 May 2024 11:14:15 -0500 Subject: [PATCH] debug --- src/api/src/backend/serializers/PipelineLockModelSerializer.py | 1 + src/api/src/backend/views/PipelineLocks.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/api/src/backend/serializers/PipelineLockModelSerializer.py b/src/api/src/backend/serializers/PipelineLockModelSerializer.py index c13f4628..cb06ad96 100644 --- a/src/api/src/backend/serializers/PipelineLockModelSerializer.py +++ b/src/api/src/backend/serializers/PipelineLockModelSerializer.py @@ -12,6 +12,7 @@ def serialize(model, pipeline): lock["created_at"] = model.created_at.strftime(DATETIME_FORMAT) lock["expires_in"] = model.expires_in + lock["acquired_at"] = None if model.acquired_at != None: lock["acquired_at"] = model.acquired_at.strftime(DATETIME_FORMAT) diff --git a/src/api/src/backend/views/PipelineLocks.py b/src/api/src/backend/views/PipelineLocks.py index f394188b..766050ce 100644 --- a/src/api/src/backend/views/PipelineLocks.py +++ b/src/api/src/backend/views/PipelineLocks.py @@ -105,6 +105,7 @@ def post(self, request, group_id, pipeline_id): # Check to see if the pipeline run associated with the current # pipeline lock attempt is the next in the queue. If so, update the # pipeline lock's 'acquired_at' property + print(str(pipeline_lock.pipeline_run.uuid), competing_runs[0]) if str(pipeline_lock.pipeline_run.uuid) == competing_runs[0]: acquired_at = timezone.now() pipeline_lock.object.update(acquired_at=acquired_at)