Spaces:
Runtime error
Runtime error
Download src/modules/integration/redrive.controller.ts from MuhammadNoman7600/qwen_2.5_model: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/integration/redrive.controller.ts
- Command line
-
hf download hf://spaces/MuhammadNoman7600/qwen_2.5_model/src/modules/integration/redrive.controller.ts
-
curl -L -o redrive.controller.ts https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/integration/redrive.controller.ts
1.16 kB
| import { Controller, Param, Post } from '@nestjs/common'; | |
| import { ApiTags, ApiResponse } from '@nestjs/swagger'; | |
| import { RequireRole } from '../auth/decorators/auth.decorators'; | |
| import { ApiKeyRole } from '../auth/entities/api-key.entity'; | |
| import { RedriveService } from './redrive.service'; | |
| // Re-dispatching DLQ'd inbound payloads can cause real downstream sends, so this operator action is | |
| // ADMIN-gated — matching the sibling IntegrationInstanceController. (A bare API key, even VIEWER, | |
| // must NOT be able to trigger it.) | |
| ('integration') | |
| ('integration/instances') | |
| (ApiKeyRole.ADMIN) | |
| export class RedriveController { | |
| constructor(private readonly redrive: RedriveService) {} | |
| (':pluginId/:instanceId/redrive') | |
| ({ | |
| status: 201, | |
| description: 'One bounded batch of dead-lettered ingress deliveries re-dispatched, with remaining depth.', | |
| }) | |
| redriveInstance( | |
| ('pluginId') pluginId: string, | |
| ('instanceId') instanceId: string, | |
| ): Promise<{ redriven: number; remaining: number; batchSize: number }> { | |
| return this.redrive.redriveInstance(pluginId, instanceId); | |
| } | |
| } | |