File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -92,16 +92,18 @@ async def run_worker(config: Dict[str, Any]) -> None:
92
92
Args:
93
93
config (Dict[str, Any]): Configuration parameters for the worker.
94
94
"""
95
- connector = aiohttp .TCPConnector (limit = None )
96
- async with aiohttp .ClientSession (
97
- connector = connector , headers = _get_auth_header (), timeout = _TIMEOUT ) as session :
95
+ heartbeat .start_ping ()
98
96
97
+ client_session = aiohttp .ClientSession (
98
+ connector = aiohttp .TCPConnector (limit = None ),
99
+ headers = _get_auth_header (), timeout = _TIMEOUT
100
+ )
101
+
102
+ async with client_session as session :
99
103
job_scaler = JobScaler (
100
104
concurrency_controller = config .get ('concurrency_controller' , None )
101
105
)
102
106
103
- heartbeat .start_ping ()
104
-
105
107
while job_scaler .is_alive ():
106
108
107
109
async for job in job_scaler .get_jobs (session ):
You can’t perform that action at this time.
0 commit comments