Compare commits

...

1 commit

Author SHA1 Message Date
Lukasz Ostrowski
7d410cab09 Product feed - change max function exec time to 5 minutes 2023-09-22 09:05:24 +02:00
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
"saleor-app-products-feed": patch
---
Changed Vercel's maximum execution time to be 5 minutes for feed generation. This should help with the previous limits of 60s, that was not enough for feed to be generated.

View file

@ -16,6 +16,10 @@ import { getDownloadUrl, getFileName } from "../../../../../modules/file-storage
import { RootConfig } from "../../../../../modules/app-configuration/app-config";
import { z, ZodError } from "zod";
export const config = {
maxDuration: 5,
};
// By default we cache the feed for 5 minutes. This can be changed by setting the FEED_CACHE_MAX_AGE
const FEED_CACHE_MAX_AGE = process.env.FEED_CACHE_MAX_AGE
? parseInt(process.env.FEED_CACHE_MAX_AGE, 10)