Skip to content

Commit

Permalink
Replace references to acquired prop on PipelineLock with acquired_at
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed May 13, 2024
1 parent d258583 commit cb64228
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/src/backend/views/PipelineLocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def post(self, request, group_id, pipeline_id):
# pipeline lock's 'acquired' property to 'true'
if pipeline_lock.pipeline_run.uuid == competing_runs[0]:
acquired_at = timezone.now()
pipeline_lock.object.update(acquired=True, acquired_at=acquired_at)
pipeline_lock.object.update(acquired_at=acquired_at)

# Set the message for the pipeline lock acquisition attempt
message = f"Lock not acquired. Locks ahead of '{str(pipeline_lock.uuid)}'"
if pipeline_lock.acquired:
if pipeline_lock.acquired_at != None:
message = f"Pipeline Lock acquired by '{str(pipeline_lock.uuid)}'"

return BaseResponse(
Expand Down

0 comments on commit cb64228

Please sign in to comment.