From 7b6d80cf82b4684a5e6d249038c7aaa542adf92b Mon Sep 17 00:00:00 2001 From: jasonqindev Date: Mon, 23 Dec 2024 16:26:01 +0800 Subject: [PATCH 1/2] Fix: Duplicate tweet scheduling loops in start method - Resolved an issue where `generateNewTweetLoop` was called twice in the `start` method of /packages/client-twitter/src/post.ts.\n- The method was invoked at line 174 and line 190 without any conditional checks, leading to two independent tweet scheduling loops being created.\n- Removed one of the redundant `generateNewTweetLoop` calls to ensure only a single scheduling loop is initialized.\n\nFixes #1395 --- packages/client-twitter/src/post.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 65fe46956a..62892504ff 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -187,7 +187,6 @@ export class TwitterPostClient { } else { elizaLogger.log("Action processing loop disabled by configuration"); } - generateNewTweetLoop(); } constructor(client: ClientBase, runtime: IAgentRuntime) { From c38add3c6ce1d80dcf65ead4d0a3c9eb54d758c0 Mon Sep 17 00:00:00 2001 From: jasonqindev Date: Mon, 23 Dec 2024 17:14:58 +0800 Subject: [PATCH 2/2] Fix: Move generateNewTweetLoop() into the if condition for enableActionProcessing --- packages/client-twitter/src/post.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 62892504ff..51db549ddd 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -184,6 +184,7 @@ export class TwitterPostClient { error ); }); + generateNewTweetLoop(); } else { elizaLogger.log("Action processing loop disabled by configuration"); }