Explorar o código

fix celery calling

tomoya %!s(int64=2) %!d(string=hai) anos
pai
achega
2f1e0f2f30
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      backend/app/app/api/api_v1/endpoints/videos.py

+ 3 - 1
backend/app/app/api/api_v1/endpoints/videos.py

@@ -67,7 +67,9 @@ def upload_plot(
     finally:
         upload_file.file.close()
 
-    celery_app.send_task("app.worker.test_celery", args=[video.id, video.stored_file_name, current_user.id])
+    celery_app.send_task("app.worker.test_celery", kwargs={"video_id": video.id, 
+                                                           "zip_filename": video.stored_file_name+".zip", 
+                                                           "user_id": current_user.id})
     return video
 
 @router.get("/{id}")