Skip to content

Commit

Permalink
AnyscaleHook make logging behavior consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
marwan116 committed Jun 25, 2024
1 parent a252554 commit efb9eba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion anyscale_provider/hooks/anyscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_job_status(self, job_id: str) -> JobStatus:
:param job_id: The ID of the job.
"""
self.log.info(f"Fetching job status for Job name: {job_id}")
self.log.info(f"Fetching job status for Job ID: {job_id}")
return self.client.job.status(id=job_id)

def get_service_status(self, service_name: str) -> ServiceStatus:
Expand All @@ -103,6 +103,7 @@ def get_service_status(self, service_name: str) -> ServiceStatus:
:param service_name: The name of the service.
"""
self.log.info(f"Fetching service status for Service: {service_name}")
return self.client.service.status(name=service_name)

def terminate_job(self, job_id: str, time_delay: int) -> bool:
Expand Down Expand Up @@ -143,5 +144,6 @@ def get_job_logs(self, job_id: str, run: str | None = None) -> str:
:param job_id: Required. The ID of the job.
"""
self.log.info(f"Fetching logs for Job ID: {job_id} and Run: {run}")
logs: str = self.client.job.get_logs(id=job_id, run=run)
return logs

0 comments on commit efb9eba

Please sign in to comment.