Spaces:
Runtime error
Runtime error
Download src/modules/webhook/webhook.module.ts from MuhammadNoman7600/qwen_2.5_model: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/webhook/webhook.module.ts
- Command line
-
hf download hf://spaces/MuhammadNoman7600/qwen_2.5_model/src/modules/webhook/webhook.module.ts
-
curl -L -o webhook.module.ts https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/webhook/webhook.module.ts
1.15 kB
| import { Module, DynamicModule, Type } from '@nestjs/common'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { Webhook } from './entities/webhook.entity'; | |
| import { WebhookDeliveryFailure } from './entities/webhook-delivery-failure.entity'; | |
| import { WebhookService } from './webhook.service'; | |
| import { WebhookController } from './webhook.controller'; | |
| import { WebhooksListController } from './webhooks-list.controller'; | |
| import { EngineModule } from '../../engine/engine.module'; | |
| // Only import QueueModule if explicitly enabled to avoid Redis connection errors | |
| const queueModules: Array<Type | DynamicModule> = []; | |
| if (process.env.QUEUE_ENABLED === 'true') { | |
| // eslint-disable-next-line @typescript-eslint/no-require-imports | |
| const queueModule = require('../queue/queue.module') as { | |
| QueueModule: Type; | |
| }; | |
| queueModules.push(queueModule.QueueModule); | |
| } | |
| ({ | |
| imports: [TypeOrmModule.forFeature([Webhook, WebhookDeliveryFailure], 'data'), EngineModule, ...queueModules], | |
| controllers: [WebhookController, WebhooksListController], | |
| providers: [WebhookService], | |
| exports: [WebhookService], | |
| }) | |
| export class WebhookModule {} | |