Spaces:
Sleeping
Sleeping
Update main.py
Browse files
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")
|