chore(core): do remove timeout for audio transcription job (#12965)

#### PR Dependency Tree


* **PR #12965** 👈

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 request timeout handling to ensure timeouts are only set when
appropriate and provide clearer error messages.
* Updated audio transcription submission to wait indefinitely for
completion, preventing requests from being aborted due to timeouts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Peng Xiao
2025-06-30 14:00:53 +08:00
committed by GitHub
parent 5599c39e97
commit f7f69c3bc4
2 changed files with 7 additions and 4 deletions

View File

@@ -41,9 +41,12 @@ export class FetchService extends Service {
});
const timeout = init?.timeout ?? 15000;
const timeoutId = setTimeout(() => {
abortController.abort('timeout');
}, timeout);
const timeoutId =
timeout > 0
? setTimeout(() => {
abortController.abort(new Error('timeout after ' + timeout + 'ms'));
}, timeout)
: undefined;
let res: Response;

View File

@@ -43,7 +43,7 @@ export class AudioTranscriptionJobStore extends Entity<{
}
const files = await this.props.getAudioFiles();
const response = await graphqlService.gql({
timeout: 600_000, // default 15s is too short for audio transcription
timeout: 0, // default 15s is too short for audio transcription
query: submitAudioTranscriptionMutation,
variables: {
workspaceId: this.currentWorkspaceId,