diff --git a/third_party/airflow/armada/operators/jobservice.py b/third_party/airflow/armada/operators/jobservice.py index a2f56acf6c7..7a21b87a8cf 100644 --- a/third_party/airflow/armada/operators/jobservice.py +++ b/third_party/airflow/armada/operators/jobservice.py @@ -4,6 +4,7 @@ import tenacity + class JobServiceClient: """ The JobService Client @@ -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: @@ -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())