Omkar008 commited on
Commit
a50e7bc
·
verified ·
1 Parent(s): 6e60af6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -0
main.py CHANGED
@@ -23,6 +23,7 @@ async def batch_processing_result(request: Request, background_tasks: Background
23
  batch_id = body.get('batch_job_id')
24
  print(batch_id)
25
  # Add the processing task to background tasks
 
26
  if batch_job.status == 'completed':
27
  background_tasks.add_task(process_batch_data, batch_id)
28
  insert_response = (supabase.table("batch_processing_details")
 
23
  batch_id = body.get('batch_job_id')
24
  print(batch_id)
25
  # Add the processing task to background tasks
26
+ batch_job = client.batches.retrieve(batch_id)
27
  if batch_job.status == 'completed':
28
  background_tasks.add_task(process_batch_data, batch_id)
29
  insert_response = (supabase.table("batch_processing_details")