import { Global, Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { RequestTimeoutInterceptor } from './request-timeout.interceptor';
import { ShutdownCoordinatorService } from './shutdown-coordinator.service';

@Global()
@Module({
  providers: [
    ShutdownCoordinatorService,
    { provide: APP_INTERCEPTOR, useClass: RequestTimeoutInterceptor },
  ],
  exports: [ShutdownCoordinatorService],
})
export class ReliabilityModule {}
