feat: youtube upload can't have concurrency as it can be a long request
This commit is contained in:
parent
0df9fd392e
commit
2db252f97f
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -222,7 +222,8 @@ export class YoutubeProvider extends SocialAbstract implements SocialProvider {
|
|||
media: {
|
||||
body: response.data,
|
||||
},
|
||||
})
|
||||
}),
|
||||
true
|
||||
);
|
||||
|
||||
if (settings?.thumbnail?.path) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue