mirror of
https://github.com/unraid/api.git
synced 2026-05-01 04:31:31 -05:00
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:
@@ -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,
|
||||
|
||||
@@ -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],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user