Skip to content

Conversation

@jtomaszewski
Copy link

Summary

  • Implement OnModuleDestroy lifecycle hook for proper cleanup during application shutdown
  • Unsubscribe from RxJS interval to stop polling on shutdown
  • Track in-flight event processing and wait for completion before shutdown completes
  • Add isShuttingDown flag to prevent new processing during shutdown

Test plan

  • Added unit tests for graceful shutdown behavior
  • Tests verify subscription is properly unsubscribed
  • Tests verify polling stops after shutdown is initiated
  • Tests verify in-flight processing is awaited before shutdown completes
  • All existing tests pass

🤖 Generated with Claude Code

jtomaszewski and others added 2 commits December 3, 2025 02:07
…ntPoller

Implement OnModuleDestroy lifecycle hook to properly clean up resources
during application shutdown:
- Unsubscribe from RxJS interval to stop polling
- Track in-flight event processing and wait for completion
- Add isShuttingDown flag to prevent new processing during shutdown

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jtomaszewski jtomaszewski force-pushed the vk/57d1-add-graceful-shu branch from 530822a to 23d2bee Compare December 3, 2025 01:11
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/fullstackhouse/nestjs-inbox-outbox/@nestixis/nestjs-inbox-outbox@4
npm i https://pkg.pr.new/fullstackhouse/nestjs-inbox-outbox/@nestixis/nestjs-inbox-outbox-mikroorm-driver@4
npm i https://pkg.pr.new/fullstackhouse/nestjs-inbox-outbox/@nestixis/nestjs-inbox-outbox-typeorm-driver@4

commit: 23d2bee

@jtomaszewski jtomaszewski merged commit 0eff057 into main Dec 3, 2025
4 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.

2 participants