diff --git a/src/api/specs/WorkflowsAPI.yaml b/src/api/specs/WorkflowsAPI.yaml index 46097b7b..73dd7d22 100644 --- a/src/api/specs/WorkflowsAPI.yaml +++ b/src/api/specs/WorkflowsAPI.yaml @@ -2123,8 +2123,6 @@ components: pipeline_run_uuid: type: string format: uuid - acquired: - type: boolean created_at: type: string acquired_at: diff --git a/src/api/src/backend/serializers/PipelineLockAcquisitionResponseSerializer.py b/src/api/src/backend/serializers/PipelineLockAcquisitionResponseSerializer.py index 92e5b1f1..7fe0516a 100644 --- a/src/api/src/backend/serializers/PipelineLockAcquisitionResponseSerializer.py +++ b/src/api/src/backend/serializers/PipelineLockAcquisitionResponseSerializer.py @@ -6,7 +6,7 @@ class PipelineLockAcquisitionResponseSerializer: @staticmethod def serialize(pipeline_lock, message): return { - "acquired": pipeline_lock.acquired, + "acquired": pipeline_lock.acquired_at != None, "message": message, "pipeline_lock_uuid": UUIDSerializer.serialize(pipeline_lock.uuid) } \ No newline at end of file diff --git a/src/api/src/backend/views/PipelineLocks.py b/src/api/src/backend/views/PipelineLocks.py index 98c65d23..c11cb878 100644 --- a/src/api/src/backend/views/PipelineLocks.py +++ b/src/api/src/backend/views/PipelineLocks.py @@ -104,7 +104,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' property to 'true' + # pipeline lock's 'acquired_at' property if pipeline_lock.pipeline_run.uuid == competing_runs[0]: acquired_at = timezone.now() pipeline_lock.object.update(acquired_at=acquired_at)