feat: introduce routing status tracking for approved roads and telemetry batch queue limits
This commit is contained in:
@@ -25,14 +25,17 @@ export class TelemetryController {
|
||||
|
||||
@Post('batch')
|
||||
@ApiOperation({
|
||||
summary: 'Batch ingest driver telemetry points 📦',
|
||||
description: 'Receives an array of telemetry points for offline-buffered sync or high-frequency traces.',
|
||||
summary: 'Queue navigation telemetry batch 📦',
|
||||
description: 'Acknowledges a navigation batch immediately; the server persists it from Redis in the background.',
|
||||
})
|
||||
async ingestBatch(@Body() body: DriverTelemetryBatchDto) {
|
||||
if (!body || !Array.isArray(body.points)) {
|
||||
throw new HttpException('Invalid payload: expected { points: [...] }', HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
return this.telemetryService.ingestBatch(body.points);
|
||||
if (body.points.length > 100) {
|
||||
throw new HttpException('A telemetry batch may contain at most 100 points', HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
return this.telemetryService.enqueueBatch(body.points);
|
||||
}
|
||||
|
||||
@Get('nearby')
|
||||
|
||||
Reference in New Issue
Block a user