Update threadKeepAlive.ts

This commit is contained in:
Corey Johnson 2025-07-16 10:54:25 -07:00
parent ffd7ad1fa0
commit 17b7ab3a9d

View File

@ -69,7 +69,14 @@ const reviveThread = async (client: Client, threadData: TrackedThread) => {
console.log(`🟢 Thread "${threadData.threadName}" is already active, no action needed`)
}
} catch (error) {
console.error(`🚫 Failed to revive "${threadData.threadName}".`, getErrorMessage(error))
console.error(
`🚫 Failed to revive "${threadData.threadName}:${threadData.threadId}".`,
getErrorMessage(error)
)
await KV.update("threads", {}, (threads) => {
delete threads[threadData.threadId]
return threads
})
}
}