Missing Scheduler of Public APP#1605
Open
stefangutica wants to merge 3 commits into
Open
Conversation
claudiulataretu
previously approved these changes
May 29, 2026
|
k6 load testing comparison.
Legend: Avg - Average Response Time, Max - Maximum Response Time, 90 - 90th Percentile, 95 - 95th Percentile |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR moves scheduler and event-emitter initialization from the shared metrics module into individual Nest app root modules so each bootstrapped app has its own dependencies registered.
Changes:
- Adds
ScheduleModule.forRoot()and/orEventEmitterModule.forRoot({ maxListeners: 1 })to app and worker root modules. - Removes
EventEmitterModule.forRoot()fromApiMetricsModule. - Aligns cron, websocket, queue, pub/sub, and API root modules around explicit event-emitter registration.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/queue.worker/nft.worker/queue/nft.queue.module.ts |
Registers scheduler and event emitter for the NFT queue worker. |
src/public.app.module.ts |
Registers scheduler and event emitter for the public API root module. |
src/private.app.module.ts |
Registers scheduler and event emitter for the private API root module. |
src/crons/websocket/websocket.subscription.module.ts |
Adds event emitter registration to the websocket subscription cron app. |
src/crons/transaction.processor/transaction.processor.module.ts |
Adds event emitter registration to the transaction processor cron app. |
src/crons/transaction.processor/transaction.completed.module.ts |
Adds event emitter registration to the transaction completed cron app. |
src/crons/transaction.processor/batch.transaction.processor.module.ts |
Adds event emitter registration to the batch transaction processor cron app. |
src/crons/status.checker/status.checker.module.ts |
Adds event emitter registration to the status checker cron app. |
src/crons/elastic.updater/elastic.updater.module.ts |
Adds event emitter registration to the elastic updater cron app. |
src/crons/cache.warmer/cache.warmer.module.ts |
Adds event emitter registration to the cache warmer cron app. |
src/common/websockets/web-socket-publisher-module.ts |
Registers scheduler and event emitter for the websocket publisher microservice. |
src/common/rabbitmq/rabbitmq.module.ts |
Registers scheduler and event emitter for the RabbitMQ notifier app. |
src/common/pubsub/pub.sub.listener.module.ts |
Registers scheduler and event emitter for the Redis pub/sub listener microservice. |
src/common/metrics/api.metrics.module.ts |
Removes centralized event-emitter registration from the global metrics module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reasoning
schedulerimported at the root moduleevent emitterimported at the root moduleProposed Changes
ScheduleModuleandEventEmitterat each individual app root moduleHow to test