🎥 Make videos programmatically with React
move client in invoke that causes issue in the pipeline
Alex Fernandez64a74ede19f9
diff --git a/.gitignore b/.gitignoreindex 6496d03a14..b9b425a37d 100644--- a/.gitignore+++ b/.gitignore@@ -17,3 +17,4 @@ packages/example/sa-key.jsonpackages/example/public/pts-framermp4withoutfileextension.mp4packages/it-tests/packages/example/out/element-2.pngpackages/lambda-python/*/__pycache__+packages/lambda-python/remotion-env-lintdiff --git a/packages/it-tests/src/monorepo/python-package.test.ts b/packages/it-tests/src/monorepo/python-package.test.tsindex f759052687..97d1cb2288 100644--- a/packages/it-tests/src/monorepo/python-package.test.ts+++ b/packages/it-tests/src/monorepo/python-package.test.ts@@ -34,8 +34,8 @@ test("Python package should create the same renderMedia payload as normal Lambdaconsole.log("cwd", cwd);const pythonOutput = execSync("pytest -rP tests/test_render_client.py", {cwd,- stdio: "inherit",});+const output = pythonOutput.toString().split("\n");console.log(output);const toParse = output[10];diff --git a/packages/lambda-python/remotion_lambda/remotionclient.py b/packages/lambda-python/remotion_lambda/remotionclient.pyindex d030cdbd88..b5f3d8a38a 100644--- a/packages/lambda-python/remotion_lambda/remotionclient.py+++ b/packages/lambda-python/remotion_lambda/remotionclient.py@@ -25,7 +25,6 @@ class RemotionClient:self.region = regionself.serve_url = serve_urlself.function_name = function_name- self.client = self._create_lambda_client()def _serialize_input_props(self, input_props, render_type):"""@@ -70,11 +69,12 @@ class RemotionClient:aws_secret_access_key=self.secret_key,region_name=self.region)- return boto3.client('lambda')+ return boto3.client('lambda', region_name=self.region)def _invoke_lambda(self, function_name, payload):try:- response = self.client.invoke(+ client = self._create_lambda_client()+ response = client.invoke(FunctionName=function_name, Payload=payload)result = response['Payload'].read().decode('utf-8')diff --git a/packages/lambda-python/remotion_lambda/version.py b/packages/lambda-python/remotion_lambda/version.pyindex 6bea9259c9..66c8e001f2 100644--- a/packages/lambda-python/remotion_lambda/version.py+++ b/packages/lambda-python/remotion_lambda/version.py@@ -1,2 +1,2 @@# pylint: disable=missing-module-docstring, missing-final-newline-VERSION = "4.0.10"+VERSION = "4.0.10"\ No newline at end of file