π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: add expiration for stuck jobs
Nevo David889a031e0e7e
diff --git a/libraries/helpers/src/utils/concurrency.service.ts b/libraries/helpers/src/utils/concurrency.service.tsindex 99ee82fa3..88417d957 100644--- a/libraries/helpers/src/utils/concurrency.service.ts+++ b/libraries/helpers/src/utils/concurrency.service.ts@@ -23,15 +23,18 @@ export const concurrency = async <T>(});let load: T;try {- load = await mapper[strippedIdentifier].schedule<T>(async () => {- return await Promise.race<T>([- new Promise<T>(async (res) => {- await timer(300000);- res(true as T);- }),- func(),- ]);- });+ load = await mapper[strippedIdentifier].schedule<T>(+ { expiration: 600000 },+ async () => {+ return await Promise.race<T>([+ new Promise<T>(async (res) => {+ await timer(300000);+ res(true as T);+ }),+ func(),+ ]);+ }+ );} catch (err) {}return load;