feat: youtube upload can't have concurrency as it can be a long request

This commit is contained in:
Nevo David 2025-08-13 22:01:20 +07:00
parent 0df9fd392e
commit 2db252f97f
2 changed files with 12 additions and 4 deletions

View File

@ -38,11 +38,17 @@ export abstract class SocialAbstract {
d: { query: string },
id: string,
integration: Integration
): Promise<{ id: string; label: string; image: string, doNotCache?: boolean }[] | { none: true }> {
): Promise<
| { id: string; label: string; image: string; doNotCache?: boolean }[]
| { none: true }
> {
return { none: true };
}
async runInConcurrent<T>(func: (...args: any[]) => Promise<T>) {
async runInConcurrent<T>(
func: (...args: any[]) => Promise<T>,
ignoreConcurrency?: boolean
) {
const value = await concurrency<any>(
this.identifier,
this.maxConcurrentJob,
@ -54,7 +60,8 @@ export abstract class SocialAbstract {
const handle = this.handleErrors(JSON.stringify(err));
return { err: true, ...(handle || {}) };
}
}
},
ignoreConcurrency
);
if (value && value?.err && value?.value) {

View File

@ -222,7 +222,8 @@ export class YoutubeProvider extends SocialAbstract implements SocialProvider {
media: {
body: response.data,
},
})
}),
true
);
if (settings?.thumbnail?.path) {