Skip to content

fix: duplicate tweet log#1402

Merged
mcp97 merged 5 commits into
elizaOS:developfrom
jasonqindev:fix/duplicate-next-tweet-log
Dec 23, 2024
Merged

fix: duplicate tweet log#1402
mcp97 merged 5 commits into
elizaOS:developfrom
jasonqindev:fix/duplicate-next-tweet-log

Conversation

@jasonqindev

Copy link
Copy Markdown
Contributor
  • Resolved an issue where generateNewTweetLoop was called twice in the start method of /packages/client-twitter/src/post.ts.
  • The method was invoked at line 174 and line 190 without any conditional checks, leading to two independent tweet scheduling loops being created.
  • Move second generateNewTweetLoop() inside the if (enableActionProcessing)

Fixes #1395

Relates to:

Issue #1395

Risks

Low: Removing the redundant call ensures only one scheduling loop, minimal impact on other functionalities.

Background

What does this PR do?

This PR fixes an issue where generateNewTweetLoop was called twice, leading multiple tweets to be posted. It ensures only a single scheduling loop is initialized by removing the redundant call.

What kind of change is this?

Bug fixes (non-breaking change which fixes an issue)

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

Start by reviewing the start method in /packages/client-twitter/src/post.ts, focusing on the moving second generateNewTweetLoop() inside the if (enableActionProcessing) condition.

Detailed testing steps

  1. Configure the Twitter client and set POST_IMMEDIATELY=true to enable immediate tweet posting.
  2. Start the service and observe if two tweets are sent, and check if the log contains multiple Next tweet scheduled in xxx minutes messages.
  3. Verify that after starting the service, only one tweet is sent and the Next tweet scheduled in xxx minutes message is logged only once.
  4. Confirm that tweets are still being scheduled correctly without any issues.

jasonqindev and others added 4 commits December 23, 2024 16:26
- 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 elizaOS#1395
@jasonqindev

jasonqindev commented Dec 23, 2024

Copy link
Copy Markdown
Contributor Author

The PR I previously created has been closed, which was incorrect. I have created a new PR to merge into the develop branch.

@mcp97 mcp97 merged commit fc6c216 into elizaOS:develop Dec 23, 2024
1to3for5vi7ate9x pushed a commit to 1to3for5vi7ate9x/eliza that referenced this pull request Jan 26, 2025
lalalune pushed a commit that referenced this pull request May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants