Skip to content

Commit 163c8fc

Browse files
committed
Improve continous logs fetching logic
1 parent eed8e1a commit 163c8fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cloudai/systems/kubernetes/kubernetes_system.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,14 @@ def _is_mpijob_running(self, job: KubernetesJob) -> bool:
172172
if not conditions:
173173
return True
174174

175+
self.store_logs_for_job(job.name, job.test_run.output_path)
176+
175177
for condition in conditions:
176178
if condition["type"] == "Succeeded" and condition["status"] == "True":
177179
return False
178180
if condition["type"] == "Failed" and condition["status"] == "True":
179181
return False
180182

181-
self.store_logs_for_job(job.name, job.test_run.output_path)
182183
# If the job has been created but is neither succeeded nor failed, it is considered running
183184
return any(condition["type"] == "Created" and condition["status"] == "True" for condition in conditions)
184185

0 commit comments

Comments
 (0)