@@ -44,8 +44,6 @@ async def convert_script(
4444 logger .info ("Migrating query: %s\n " , source_script )
4545
4646 # Setup the group chat for the agents
47- # chat = CommsManager(sql_agents.idx_agents).group_chat
48- # retry logic comms manager
4947 comms_manager = CommsManager (
5048 sql_agents .idx_agents ,
5149 max_retries = 5 , # Retry up to 5 times for rate limits
@@ -76,8 +74,6 @@ async def convert_script(
7674 try :
7775
7876 async for response in comms_manager .async_invoke ():
79- # TEMPORARY: awaiting bug fix for rate limits
80- # await asyncio.sleep(5)
8177 carry_response = response
8278 if response .role == AuthorRole .ASSISTANT .value :
8379 # Our process can terminate with either of these as the last response
@@ -202,20 +198,6 @@ async def convert_script(
202198 }
203199
204200 logger .info (description )
205-
206- # send status update to the client of type in progress with agent status
207- # send_status_update(
208- # status=FileProcessUpdate(
209- # file.batch_id,
210- # file.file_id,
211- # ProcessStatus.IN_PROGRESS,
212- # AgentType(response.name),
213- # json.loads(response.content)["summary"],
214- # FileResult.INFO,
215- # ),
216- # )
217- # Safely parse response content to avoid crashing on malformed or incomplete JSON
218- # start
219201 try :
220202 parsed_content = json .loads (response .content or "{}" )
221203 except json .JSONDecodeError :
@@ -249,7 +231,6 @@ async def convert_script(
249231 AuthorRole (response .role ),
250232 )
251233 except Exception as e :
252- # logger.error("Error during chat.invoke(): %s", str(e))
253234 logger .error ("Error during comms_manager.async_invoke(): %s" , str (e ))
254235 # Log the error to the batch service for tracking
255236 await batch_service .create_file_log (
@@ -271,7 +252,7 @@ async def convert_script(
271252 FileResult .ERROR ,
272253 ),
273254 )
274- break # Exit the while loop on critical error
255+ break
275256
276257 if comms_manager .group_chat .is_complete :
277258 is_complete = True
@@ -333,7 +314,6 @@ async def validate_migration(
333314 )
334315
335316 logger .error ("No migrated query returned. Migration failed." )
336- # Add needed error or log data to the file record here
337317 return False
338318
339319 # send status update to the client of type completed / success
0 commit comments