Разбор встреч: прерванные перезапуском расшифровки возвращаются в очередь при старте
All checks were successful
ci / test (push) Successful in 55s
ci / deploy (push) Successful in 3m9s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 22:39:47 +03:00
parent fef474232c
commit 1e5e311962

View File

@@ -114,6 +114,10 @@ export class MeetingWatcher {
start(): void {
if (!this.o.scanMs || this.timer) return;
// перезапуск сервиса (деплой) прервал расшифровку: единственный обработчик - этот процесс, значит «transcribing» осталось от прежнего
void this.deps.ctx.pool
.query("update meeting_recording set status = 'new', updated_at = now() where status = 'transcribing'")
.catch((e) => this.deps.ctx.log.error({ err: String(e) }, "не удалось вернуть прерванные расшифровки в очередь"));
this.timer = setInterval(() => void this.tick().catch((e) => this.deps.ctx.log.error({ err: String(e) }, "разбор записей встреч не удался")), this.o.scanMs);
void this.tick().catch((e) => this.deps.ctx.log.error({ err: String(e) }, "разбор записей встреч не удался"));
}