Skip to content

Feat/memory#151

Merged
LaGodxy merged 14 commits into
MettaChain:mainfrom
nafiuishaaq:feat/memory
Mar 24, 2026
Merged

Feat/memory#151
LaGodxy merged 14 commits into
MettaChain:mainfrom
nafiuishaaq:feat/memory

Conversation

@nafiuishaaq
Copy link
Copy Markdown
Contributor

Hardened the background email job processor in email.queue.ts. Jobs now get an explicit Bull timeout plus an in-processor timeout guard, recurring memory sampling logs heap/RSS usage and warns on threshold breaches, and shutdown now clears monitors, detaches queue listeners, and closes queues cleanly so listeners and timers do not accumulate.

I also added per-job cleanup in the processor finally path to drop large job payload references after execution, and a periodic queue-history cleanup pass so completed/failed job retention stays bounded. Coverage for the new behavior is in email.queue.spec.ts, including timeout enforcement and shutdown cleanup.

Closes #105

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 24, 2026

@nafiuishaaq 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

@LaGodxy LaGodxy merged commit 5f0b34d into MettaChain:main Mar 24, 2026
1 check failed
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.

Memory Leak Potential

2 participants