Implement clearing of last stop data

This commit is contained in:
2025-11-14 10:19:15 -08:00
parent 4523badea9
commit f76126c951
2 changed files with 12 additions and 0 deletions

View File

@@ -566,6 +566,7 @@ export class RedisShuttleRepository extends BaseRedisRepository implements Shutt
if (keys.length > 0) {
await this.redisClient.del(keys);
}
await this.clearShuttleLastStopData();
}
public async clearOrderedStopData(): Promise<void> {
@@ -588,4 +589,11 @@ export class RedisShuttleRepository extends BaseRedisRepository implements Shutt
await this.redisClient.del(keys);
}
}
private async clearShuttleLastStopData(): Promise<void> {
const keys = await this.redisClient.keys('shuttle:laststop:*');
if (keys.length > 0) {
await this.redisClient.del(keys);
}
}
}