Owner report: "sometimes you are sending 2 weather reports at time". Data showed it was NOT sometimes — every hourly broadcast for the last 12+ h was duplicated (identical text, 0–3 s apart), single container / single node process.
Root cause (verified in installed @nestjs/schedule@12): ScheduleModule.forRoot() was called TWICE — weather.module.ts:7 and battery.module.ts:7. Nest gives each dynamic-module object its own token → two ScheduleExplorer/SchedulerOrchestrator instances, each scanning ALL app providers and registering every @Cron/@Interval method → all scheduled jobs fire twice. Battery's per-minute check was doubled too but masked by its 6 h cooldown map; weather has no such guard so it showed up as duplicate broadcasts.
Removed the second ScheduleModule.forRoot() from battery.module.ts (keeps the one in weather.module.ts)
New regression test: walks all src/**/*.module.ts and asserts ScheduleModule.forRoot( appears exactly once (negative control verified: 2 on main, 1 after fix)
Owner report: "sometimes you are sending 2 weather reports at time". Data showed it was NOT sometimes — every hourly broadcast for the last 12+ h was duplicated (identical text, 0–3 s apart), single container / single node process.
Root cause (verified in installed @nestjs/schedule@12): `ScheduleModule.forRoot()` was called TWICE — weather.module.ts:7 and battery.module.ts:7. Nest gives each dynamic-module object its own token → two ScheduleExplorer/SchedulerOrchestrator instances, each scanning ALL app providers and registering every @Cron/@Interval method → all scheduled jobs fire twice. Battery's per-minute check was doubled too but masked by its 6 h cooldown map; weather has no such guard so it showed up as duplicate broadcasts.
- Removed the second `ScheduleModule.forRoot()` from battery.module.ts (keeps the one in weather.module.ts)
- New regression test: walks all src/**/*.module.ts and asserts `ScheduleModule.forRoot(` appears exactly once (negative control verified: 2 on main, 1 after fix)
Tests 174 → 175. Build clean, oxlint clean. Lockfile untouched.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Owner report: "sometimes you are sending 2 weather reports at time". Data showed it was NOT sometimes — every hourly broadcast for the last 12+ h was duplicated (identical text, 0–3 s apart), single container / single node process.
Root cause (verified in installed @nestjs/schedule@12):
ScheduleModule.forRoot()was called TWICE — weather.module.ts:7 and battery.module.ts:7. Nest gives each dynamic-module object its own token → two ScheduleExplorer/SchedulerOrchestrator instances, each scanning ALL app providers and registering every @Cron/@Interval method → all scheduled jobs fire twice. Battery's per-minute check was doubled too but masked by its 6 h cooldown map; weather has no such guard so it showed up as duplicate broadcasts.ScheduleModule.forRoot()from battery.module.ts (keeps the one in weather.module.ts)ScheduleModule.forRoot(appears exactly once (negative control verified: 2 on main, 1 after fix)Tests 174 → 175. Build clean, oxlint clean. Lockfile untouched.