File tree Expand file tree Collapse file tree
runpod/serverless/modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ async def run_jobs(self, session: ClientSession):
221221 """
222222 tasks : Set [asyncio .Task ] = set ()
223223
224+ last_task_count = 0
224225 while self .is_alive () or not self .jobs_queue .empty ():
225226 # Fetch as many jobs as the concurrency allows
226227 while len (tasks ) < self .current_concurrency and not self .jobs_queue .empty ():
@@ -231,7 +232,10 @@ async def run_jobs(self, session: ClientSession):
231232
232233 # Wait for any job to finish
233234 if tasks :
234- log .info (f"Jobs in progress: { len (tasks )} " )
235+ current_task_count = len (tasks )
236+ if current_task_count != last_task_count :
237+ log .info (f"Jobs in progress: { current_task_count } " )
238+ last_task_count = current_task_count
235239
236240 done , pending = await asyncio .wait (
237241 tasks , return_when = asyncio .FIRST_COMPLETED , timeout = 0.1
You can’t perform that action at this time.
0 commit comments