Skip to content

Commit 30c19e4

Browse files
La0marco-c
authored andcommitted
bot: Fix artifact check on state update (#155)
Fixes #154
1 parent fdc0679 commit 30c19e4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

bot/code_coverage_bot/artifacts.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,15 @@ def download_all(self):
153153

154154
for test_task in test_tasks:
155155
status = test_task["status"]["state"]
156+
task_id = test_task["status"]["taskId"]
156157
while status not in FINISHED_STATUSES:
157158
assert status in ALL_STATUSES, "State '{}' not recognized".format(
158159
status
159160
)
160-
logger.info(
161-
"Waiting for task {} to finish...".format(
162-
test_task["status"]["taskId"]
163-
)
164-
)
161+
logger.info(f"Waiting for task {task_id} to finish...")
165162
time.sleep(60)
166-
status = taskcluster.get_task_status(test_task["status"]["taskId"])
163+
task_status = taskcluster.get_task_status(task_id)
164+
status = task_status["status"]["state"]
167165

168166
# Choose best tasks to download (e.g. 'completed' is better than 'failed')
169167
download_tasks = {}

0 commit comments

Comments
 (0)