feat: introduce routing status tracking for approved roads and telemetry batch queue limits

This commit is contained in:
Hamza-Ayed
2026-09-19 12:34:26 +03:00
parent a8470eb76c
commit 91e9e71ce4
9 changed files with 234 additions and 129 deletions
@@ -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')