Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed May 14, 2024
1 parent c007f10 commit 3743ac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions src/api/src/backend/views/PipelineLocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3743ac7

Please sign in to comment.