@@ -44,8 +44,6 @@ async def convert_script(
44
44
logger .info ("Migrating query: %s\n " , source_script )
45
45
46
46
# Setup the group chat for the agents
47
- # chat = CommsManager(sql_agents.idx_agents).group_chat
48
- # retry logic comms manager
49
47
comms_manager = CommsManager (
50
48
sql_agents .idx_agents ,
51
49
max_retries = 5 , # Retry up to 5 times for rate limits
@@ -76,8 +74,6 @@ async def convert_script(
76
74
try :
77
75
78
76
async for response in comms_manager .async_invoke ():
79
- # TEMPORARY: awaiting bug fix for rate limits
80
- # await asyncio.sleep(5)
81
77
carry_response = response
82
78
if response .role == AuthorRole .ASSISTANT .value :
83
79
# Our process can terminate with either of these as the last response
@@ -202,20 +198,6 @@ async def convert_script(
202
198
}
203
199
204
200
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
219
201
try :
220
202
parsed_content = json .loads (response .content or "{}" )
221
203
except json .JSONDecodeError :
@@ -249,7 +231,6 @@ async def convert_script(
249
231
AuthorRole (response .role ),
250
232
)
251
233
except Exception as e :
252
- # logger.error("Error during chat.invoke(): %s", str(e))
253
234
logger .error ("Error during comms_manager.async_invoke(): %s" , str (e ))
254
235
# Log the error to the batch service for tracking
255
236
await batch_service .create_file_log (
@@ -271,7 +252,7 @@ async def convert_script(
271
252
FileResult .ERROR ,
272
253
),
273
254
)
274
- break # Exit the while loop on critical error
255
+ break
275
256
276
257
if comms_manager .group_chat .is_complete :
277
258
is_complete = True
@@ -333,7 +314,6 @@ async def validate_migration(
333
314
)
334
315
335
316
logger .error ("No migrated query returned. Migration failed." )
336
- # Add needed error or log data to the file record here
337
317
return False
338
318
339
319
# send status update to the client of type completed / success
0 commit comments