(streamId: string)
| 218 | } |
| 219 | |
| 220 | export async function getLatestSeq(streamId: string): Promise<number | null> { |
| 221 | return withRedisRetry({ operation: 'get_latest_seq', streamId }, async (redis) => { |
| 222 | const currentSeq = await redis.get(getSeqKey(streamId)) |
| 223 | if (currentSeq === null) { |
| 224 | return null |
| 225 | } |
| 226 | const parsed = Number(currentSeq) |
| 227 | return Number.isFinite(parsed) ? parsed : null |
| 228 | }) |
| 229 | } |
| 230 | |
| 231 | export async function writeAbortMarker(streamId: string): Promise<void> { |
| 232 | const ttlSeconds = getStreamConfig().ttlSeconds |
no test coverage detected