Ver Fonte

fix celery calling

tomoya há 2 anos atrás
pai
commit
2f1e0f2f30
1 ficheiros alterados com 3 adições e 1 exclusões
  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}")