feat(api): integrate ScheduleModule for task scheduling

- Added `ScheduleModule` to the main application module for managing scheduled tasks.
- Removed redundant `ScheduleModule` imports from `CronModule` and `ServicesModule` to streamline module dependencies.
This commit is contained in:
Eli Bosley
2025-08-19 13:36:03 -04:00
parent b4a761c168
commit 6930bb0500
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -1,6 +1,7 @@
import { CacheModule } from '@nestjs/cache-manager';
import { Module } from '@nestjs/common';
import { APP_GUARD } from '@nestjs/core';
import { ScheduleModule } from '@nestjs/schedule';
import { ThrottlerModule } from '@nestjs/throttler';
import { AuthZGuard } from 'nest-authz';
@@ -23,6 +24,7 @@ import { UnraidFileModifierModule } from '@app/unraid-api/unraid-file-modifier/u
GlobalDepsModule,
LegacyConfigModule,
PubSubModule,
ScheduleModule.forRoot(),
LoggerModule.forRoot({
pinoHttp: {
logger: apiLogger,
+1 -1
View File
@@ -5,7 +5,7 @@ import { LogRotateService } from '@app/unraid-api/cron/log-rotate.service.js';
import { WriteFlashFileService } from '@app/unraid-api/cron/write-flash-file.service.js';
@Module({
imports: [ScheduleModule.forRoot()],
imports: [],
providers: [WriteFlashFileService, LogRotateService],
})
export class CronModule {}
@@ -6,7 +6,7 @@ import { SubscriptionPollingService } from '@app/unraid-api/graph/services/subsc
import { SubscriptionTrackerService } from '@app/unraid-api/graph/services/subscription-tracker.service.js';
@Module({
imports: [ScheduleModule.forRoot()],
imports: [],
providers: [SubscriptionTrackerService, SubscriptionHelperService, SubscriptionPollingService],
exports: [SubscriptionTrackerService, SubscriptionHelperService, SubscriptionPollingService],
})