Skip to content

Missing Scheduler of Public APP#1605

Open
stefangutica wants to merge 3 commits into
developmentfrom
hotfix/schedule-module-public-app
Open

Missing Scheduler of Public APP#1605
stefangutica wants to merge 3 commits into
developmentfrom
hotfix/schedule-module-public-app

Conversation

@stefangutica
Copy link
Copy Markdown
Collaborator

@stefangutica stefangutica commented May 29, 2026

Reasoning

  • each individual app must have its own scheduler imported at the root module
  • each individual app must have its event emitter imported at the root module

Proposed Changes

  • import ScheduleModule and EventEmitter at each individual app root module

How to test

  • dependency errors should disappear

@stefangutica stefangutica changed the title add scheduleModule in public app Missing Scheduler of Public APP May 29, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

k6 load testing comparison.
Base Commit Hash: 38d48cd
Target Commit Hash: 47b279f

Metric Base Target Diff
AvgMax9095AvgMax9095AvgMax9095
Nodes76.22647.31165.69223.97381.5632329.9671.2781.91+400.64% 🔴+4894.52% 🔴-56.99% ✅-63.43% ✅
Pool76.631667.29161.67224.1150.90566.3481.29198.29-33.58% ✅-66.03% ✅-49.72% ✅-11.52% ✅
Tokens77.282707.67147.83223.7351.11633.7581.29199.00-33.87% ✅-76.59% ✅-45.01% ✅-11.05% ✅
Transactions110.831738.34229.75435.19422.3152330.0656.0660.03+281.03% 🔴+2910.34% 🔴-75.60% ✅-86.21% ✅
Mex75.57444.63164.34223.4850.64566.3080.92198.13-33.00% ✅+27.37% 🔴-50.76% ✅-11.34% ✅
Accounts84.312550.60126.24347.4754.56825.9795.74203.63-35.28% ✅-67.62% ✅-24.16% ✅-41.40% ✅
Blocks94.72703.77241.09311.6661.21652.37103.84234.16-35.37% ✅-7.30% ✅-56.93% ✅-24.87% ✅
Test Run Duration60003.2360002.30

Legend: Avg - Average Response Time, Max - Maximum Response Time, 90 - 90th Percentile, 95 - 95th Percentile
All times are in milliseconds.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/or EventEmitterModule.forRoot({ maxListeners: 1 }) to app and worker root modules.
  • Removes EventEmitterModule.forRoot() from ApiMetricsModule.
  • 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.

Comment thread src/public.app.module.ts
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.

3 participants