|
@@ -17,7 +17,7 @@ from pathlib import Path
|
|
|
from app.core.celery_app import celery_app
|
|
|
|
|
|
BACKEND_ZIP_STORAGE = Path("/app").joinpath(settings.BACKEND_ZIP_STORAGE)
|
|
|
-LOCAL_ZIP_STORAGW = Path("/").joinpath(settings.BACKEND_ZIP_STORAGE)
|
|
|
+LOCAL_ZIP_STORAGE = Path("/").joinpath(settings.BACKEND_ZIP_STORAGE)
|
|
|
|
|
|
|
|
|
router = APIRouter()
|
|
@@ -68,8 +68,9 @@ def upload_plot(
|
|
|
upload_file.file.close()
|
|
|
zip_filename = video.stored_file_name+".zip"
|
|
|
print(str(BACKEND_ZIP_STORAGE/zip_filename))
|
|
|
- subprocess.run(["sshpass", "-p", "choozmo9",
|
|
|
- "scp", "-P", "5722", "-o", "StrictHostKeyChecking=no", f"{str(BACKEND_ZIP_STORAGE/zip_filename)}", f"root@172.104.93.163:{str(LOCAL_ZIP_STORAGW/zip_filename)}"])
|
|
|
+ r = subprocess.run(["sshpass", "-p", "choozmo9",
|
|
|
+ "scp", "-P", "5722", "-o", "StrictHostKeyChecking=no", f"{str(BACKEND_ZIP_STORAGE/zip_filename)}", f"root@172.104.93.163:{str(LOCAL_ZIP_STORAGE/zip_filename)}"])
|
|
|
+ print(r.returncode)
|
|
|
celery_app.send_task("app.worker.make_video", args=[video.id, video.stored_file_name, current_user.id])
|
|
|
return video
|
|
|
a = ["e3" 'sadf']
|