(chatId: string, streamId: string)
| 173 | } |
| 174 | |
| 175 | export async function releasePendingChatStream(chatId: string, streamId: string): Promise<void> { |
| 176 | try { |
| 177 | await releaseLock(getChatStreamLockKey(chatId), streamId) |
| 178 | } catch (error) { |
| 179 | logger.warn('Failed to release chat stream lock', { |
| 180 | chatId, |
| 181 | streamId, |
| 182 | error: toError(error).message, |
| 183 | }) |
| 184 | } finally { |
| 185 | resolvePendingChatStream(chatId, streamId) |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | export async function acquirePendingChatStream( |
| 190 | chatId: string, |
no test coverage detected