forked from ray-project/kuberay
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Test][RayJob] Transition to
Complete
if the JobStatus is STOPPED (r…
- Loading branch information
1 parent
4fb4578
commit b47ebbd
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import time | ||
from ray.job_submission import JobSubmissionClient | ||
|
||
print("Sleep 20 seconds to enable the RayJob to transition to RUNNING state") | ||
time.sleep(20) | ||
|
||
client = JobSubmissionClient("http://127.0.0.1:8265") | ||
job_details = client.list_jobs() | ||
print("Number of Jobs: " + str(len(job_details))) | ||
for job_detail in job_details: | ||
print("Stop Job: " + job_detail.submission_id) | ||
client.stop_job(job_detail.submission_id) |