@@ -29,7 +29,7 @@ class Exporter(AbstractAsyncContextManager, Metadata):
2929 grpc_options : dict [str , str ] = field (default_factory = dict )
3030
3131 async def __aexit__ (self , exc_type , exc_value , traceback ):
32- controller = jumpstarter_pb2_grpc .ControllerServiceStub (self .channel_factory ())
32+ controller = jumpstarter_pb2_grpc .ControllerServiceStub (await self .channel_factory ())
3333 logger .info ("Unregistering exporter with controller" )
3434 await controller .Unregister (
3535 jumpstarter_pb2 .UnregisterRequest (
@@ -47,7 +47,7 @@ async def __handle(self, path, endpoint, token, tls_config, grpc_options):
4747
4848 @asynccontextmanager
4949 async def session (self ):
50- controller = jumpstarter_pb2_grpc .ControllerServiceStub (self .channel_factory ())
50+ controller = jumpstarter_pb2_grpc .ControllerServiceStub (await self .channel_factory ())
5151 with Session (
5252 uuid = self .uuid ,
5353 labels = self .labels ,
@@ -76,7 +76,7 @@ async def listen(retries=5, backoff=3):
7676 retries_left = retries
7777 while True :
7878 try :
79- controller = jumpstarter_pb2_grpc .ControllerServiceStub (self .channel_factory ())
79+ controller = jumpstarter_pb2_grpc .ControllerServiceStub (await self .channel_factory ())
8080 async for request in controller .Listen (jumpstarter_pb2 .ListenRequest (lease_name = lease_name )):
8181 await listen_tx .send (request )
8282 except Exception as e :
@@ -113,7 +113,7 @@ async def status(retries=5, backoff=3):
113113 retries_left = retries
114114 while True :
115115 try :
116- controller = jumpstarter_pb2_grpc .ControllerServiceStub (self .channel_factory ())
116+ controller = jumpstarter_pb2_grpc .ControllerServiceStub (await self .channel_factory ())
117117 async for status in controller .Status (jumpstarter_pb2 .StatusRequest ()):
118118 await status_tx .send (status )
119119 except Exception as e :
0 commit comments