mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-14 00:01:03 +00:00
724c88c201
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
26 lines
1.2 KiB
TypeScript
26 lines
1.2 KiB
TypeScript
import { AppConfigModule } from '../app-config/app-config.module';
|
|
import { CronRegistrarService } from './cron-registrar.service';
|
|
import { Module } from '@nestjs/common';
|
|
import { ScheduleModule } from '@nestjs/schedule';
|
|
|
|
/**
|
|
* Shared cron infrastructure — deliberately NOT @Global. The e2e suites boot
|
|
* partial module graphs (DatabaseModule + one domain module), where a global
|
|
* module absent from the compiled tree resolves nothing: every module that
|
|
* owns a job imports SchedulingModule explicitly, so its TestingModule keeps
|
|
* compiling. ScheduleModule.forRoot() lives here (not app.module.ts) for the
|
|
* same reason, and AppConfigModule is imported so RuntimeEnvService resolves
|
|
* in those partial graphs too.
|
|
*
|
|
* No @Cron decorators exist anywhere in the tree — jobs go through
|
|
* CronRegistrarService so the test gate and shutdown semantics apply. Keep it
|
|
* that way: a decorator-declared job would be mounted by the schedule
|
|
* explorer on every harness boot, gate or no gate.
|
|
*/
|
|
@Module({
|
|
imports: [ScheduleModule.forRoot(), AppConfigModule],
|
|
providers: [CronRegistrarService],
|
|
exports: [CronRegistrarService],
|
|
})
|
|
export class SchedulingModule {}
|