Skip to content

Commit

Permalink
formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavan Kongara committed Jun 22, 2023
1 parent c9b5a59 commit 019d6fa
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions third_party/airflow/armada/operators/jobservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import tenacity


class JobServiceClient:
"""
The JobService Client
Expand All @@ -19,7 +20,11 @@ class JobServiceClient:
def __init__(self, channel):
self.job_stub = jobservice_pb2_grpc.JobServiceStub(channel)

@tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_exponential(), reraise=True)
@tenacity.retry(
stop=tenacity.stop_after_attempt(3),
wait=tenacity.wait_exponential(),
reraise=True,
)
def get_job_status(
self, queue: str, job_set_id: str, job_id: str
) -> jobservice_pb2.JobServiceResponse:
Expand All @@ -36,8 +41,12 @@ def get_job_status(
queue=queue, job_set_id=job_set_id, job_id=job_id
)
return self.job_stub.GetJobStatus(job_service_request)

@tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_exponential(), reraise=True)

@tenacity.retry(
stop=tenacity.stop_after_attempt(3),
wait=tenacity.wait_exponential(),
reraise=True,
)
def health(self) -> jobservice_pb2.HealthCheckResponse:
"""Health Check for GRPC Request"""
return self.job_stub.Health(request=empty_pb2.Empty())

0 comments on commit 019d6fa

Please sign in to comment.