mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-05 16:30:33 +08:00
fix(core): transcript cannot retry (#15476)
#### PR Dependency Tree * **PR #15476** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved connectivity for AI services configured with a global location while preserving support for regional locations. - Failed audio transcription jobs can now be restarted without recreating the job. - Preserved existing behavior for transcription jobs that are still waiting or already in other non-retryable states. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -169,8 +169,8 @@ export class AudioAttachmentBlock extends Entity<AttachmentBlockModel> {
|
||||
|
||||
readonly transcribe = async () => {
|
||||
try {
|
||||
// if job is already running, we should not start it again
|
||||
if (this.transcriptionJob.status$.value.status !== 'waiting-for-job') {
|
||||
const initialStatus = this.transcriptionJob.status$.value.status;
|
||||
if (initialStatus !== 'waiting-for-job' && initialStatus !== 'failed') {
|
||||
return;
|
||||
}
|
||||
const status = await this.transcriptionJob.start();
|
||||
|
||||
Reference in New Issue
Block a user