Skip to content

refactor(worker): Terminate the SMS cluster worker infinite setTimeout loop and gate demo seeding - #1073

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
SharifIbrahimDev:refactor/sms-worker-lifecycle
Jul 29, 2026
Merged

refactor(worker): Terminate the SMS cluster worker infinite setTimeout loop and gate demo seeding#1073
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
SharifIbrahimDev:refactor/sms-worker-lifecycle

Conversation

@SharifIbrahimDev

Copy link
Copy Markdown

Closes #918

Summary of Changes

  • Gated demo SMS queue seeding behind environment flags (process.env.NODE_ENV === 'development' or process.env.SEED_DEMO_SMS === 'true') to prevent unconditional demo data injection on module import.
  • Added stopSMSClusterWorker() lifecycle method with clearable timer and isRunning flag.
  • Called .unref() on the polling timer in Node.js environment to prevent blocking process exit.
  • Added unit tests in src/__tests__/sms-cluster-worker.test.ts.

Technical Requirements Checklist

  • Clearable timer and shutdown control (stopSMSClusterWorker).
  • Timer .unref() to avoid blocking process exit.
  • Gate demo queue seeding behind explicit development environment check.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@SharifIbrahimDev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 2ade7a5 into rinafcode:main Jul 29, 2026
6 checks passed
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.

Terminate the SMS cluster worker infinite setTimeout loop and gate demo seeding

2 participants