Skip to content

Commit d85add2

Browse files
committed
test
Signed-off-by: Charlie Truong <[email protected]>
1 parent 2856423 commit d85add2

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

.github/workflows/azure-queue-events.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
EOF
6969
7070
read-events:
71+
name: read-events-${{ matrix.worker }}
7172
needs: process-events
7273
runs-on: ubuntu-latest
7374
environment: nemo-ci
@@ -134,25 +135,11 @@ jobs:
134135
response = requests.get(url, headers=headers)
135136
if response.status_code == 200:
136137
jobs = response.json()['jobs']
137-
current_job = None
138-
139-
# Find current job by matrix variables
140-
for job in jobs:
141-
if (job['name'].startswith('read-events') and
142-
'matrix' in job and
143-
'worker' in job['matrix'] and
144-
str(job['matrix']['worker']) == current_worker):
145-
current_job = job
146-
break
147-
148-
if not current_job:
149-
print(f"Could not find current job for worker {current_worker}")
150-
return
151138
152139
# Cancel other read-events jobs
153140
for job in jobs:
154141
if (job['name'].startswith('read-events') and
155-
job['id'] != current_job['id'] and
142+
job['name'] != f"read-events-{current_worker}" and
156143
job['status'] in ['queued', 'in_progress']):
157144
cancel_url = f"{url}/{job['id']}/cancel"
158145
cancel_response = requests.post(cancel_url, headers=headers)

0 commit comments

Comments
 (0)