π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: provider timeout lower than activity timeout
Nevo Davida194b98f625c
diff --git a/libraries/nestjs-libraries/src/3rdparties/heygen/heygen.provider.ts b/libraries/nestjs-libraries/src/3rdparties/heygen/heygen.provider.tsindex 00d0af9d7..c5cb30784 100644--- a/libraries/nestjs-libraries/src/3rdparties/heygen/heygen.provider.ts+++ b/libraries/nestjs-libraries/src/3rdparties/heygen/heygen.provider.ts@@ -168,7 +168,7 @@ export class HeygenProvider extends ThirdPartyAbstract<{).json();let attempts = 0;- const maxAttempts = 600; // ~30 minutes at 3s interval+ const maxAttempts = 180; // ~9 minutes at 3s intervalwhile (true) {if (attempts++ >= maxAttempts) {throw new Error('Video generation timed out');diff --git a/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts b/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.tsindex b3f9d6376..bdb794c88 100644--- a/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts@@ -113,7 +113,7 @@ async function uploadVideo(const videoAgent = new AtpAgent({ service: 'https://video.bsky.app' });let attempts = 0;- const maxAttempts = 60; // ~30 minutes at 30s interval+ const maxAttempts = 18; // ~9 minutes at 30s intervalwhile (!blob) {if (attempts++ >= maxAttempts) {throw new BadBody(diff --git a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.tsindex 5713aeb3e..f885c1360 100644--- a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts@@ -493,7 +493,7 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {let videoStatus = 'in_progress';let attempts = 0;- const maxAttempts = 180; // ~30 minutes at 10s interval+ const maxAttempts = 54; // ~9 minutes at 10s intervalwhile (videoStatus !== 'upload_complete' && videoStatus !== 'ready') {if (attempts++ >= maxAttempts) {throw new Error('Video processing timed out');diff --git a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.tsindex ceff0de1d..c96234777 100644--- a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts@@ -683,7 +683,7 @@ export class InstagramProviderlet status = 'IN_PROGRESS';let attempts = 0;- const maxAttempts = 60; // ~30 minutes at 30s interval+ const maxAttempts = 18; // ~9 minutes at 30s intervalwhile (status === 'IN_PROGRESS') {if (attempts++ >= maxAttempts) {throw new Error('Media processing timed out');@@ -784,7 +784,7 @@ export class InstagramProviderlet status = 'IN_PROGRESS';let attempts = 0;- const maxAttempts = 60; // ~30 minutes at 30s interval+ const maxAttempts = 18; // ~9 minutes at 30s intervalwhile (status === 'IN_PROGRESS') {if (attempts++ >= maxAttempts) {throw new Error('Media processing timed out');diff --git a/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts b/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.tsindex c2e0fcfa0..a647f61e2 100644--- a/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts@@ -289,7 +289,7 @@ export class PinterestProviderlet statusCode = '';let attempts = 0;- const maxAttempts = 60; // ~30 minutes at 30s interval+ const maxAttempts = 18; // ~9 minutes at 30s intervalwhile (statusCode !== 'succeeded') {if (attempts++ >= maxAttempts) {throw new BadBody(diff --git a/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts b/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.tsindex 1d6da52c2..f7c66532b 100644--- a/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/tiktok.provider.ts@@ -414,7 +414,8 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {): Promise<{ url: string; id: string }> {const ctx = Context.current();// eslint-disable-next-line no-constant-condition- for (const i of Array(600).keys()) {+ for (const i of Array(27).keys()) {+ // ~9 minutes at 20s intervalconst post = await (await this.fetch('https://open.tiktokapis.com/v2/post/publish/status/fetch/',diff --git a/libraries/nestjs-libraries/src/integrations/social/whop.provider.ts b/libraries/nestjs-libraries/src/integrations/social/whop.provider.tsindex 12c058c31..d174b9329 100644--- a/libraries/nestjs-libraries/src/integrations/social/whop.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/whop.provider.ts@@ -255,7 +255,7 @@ export class WhopProvider extends SocialAbstract implements SocialProvider {let uploadStatus = 'pending';let attempts = 0;- const maxAttempts = 360; // ~30 minutes at 5s interval+ const maxAttempts = 108; // ~9 minutes at 5s intervalwhile (uploadStatus !== 'ready') {if (attempts++ >= maxAttempts) {throw new Error('File upload timed out');