Skip to content

🎥 Make videos programmatically with React

fix timeout

Jonny Burger6e1c63da64aa
diff --git a/packages/lambda/src/functions/helpers/get-progress.ts b/packages/lambda/src/functions/helpers/get-progress.ts
index 45a58af9cc..00dae953d5 100644
--- a/packages/lambda/src/functions/helpers/get-progress.ts
+++ b/packages/lambda/src/functions/helpers/get-progress.ts
@@ -184,7 +184,8 @@ export const getProgress = async ({
// We add a 20 second buffer for it, since AWS timeshifts can be quite a lot. Once it's 20sec over the limit, we consider it timed out
const isBeyondTimeout =
- Date.now() > Date.now() + timeoutInMiliseconds + 20000;
+ renderMetadata &&
+ Date.now() > renderMetadata.startedDate + timeoutInMiliseconds + 20000;
const allErrors: EnhancedErrorInfo[] = [
isBeyondTimeout
diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.ts
index fe333ee8aa..f80196033e 100644
--- a/packages/lambda/src/shared/constants.ts
+++ b/packages/lambda/src/shared/constants.ts
@@ -266,6 +266,7 @@ export type RenderMetadata = {
};
export type LambdaVersions =
+ | '2021-12-14'
| '2021-12-13'
| '2021-12-11'
| '2021-12-10'
@@ -296,7 +297,7 @@ export type LambdaVersions =
| '2021-06-23'
| 'n/a';
-export const CURRENT_VERSION: LambdaVersions = '2021-12-13';
+export const CURRENT_VERSION: LambdaVersions = '2021-12-14';
export type PostRenderData = {
cost: {