mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: set higher priority for compile task
This commit is contained in:
9 files changed
+31
-29
No files matched your search
@@ -206,10 +206,10 @@ export async function run(execute: string, params?: Parameter): Promise<SandboxA
|
||||
return await adaptResult(result, params);
|
||||
}
|
||||
|
||||
const queue = new PQueue({ concurrency: getConfig('parallelism') });
|
||||
const queue = new PQueue({ concurrency: getConfig('concurrency') || getConfig('parallelism') });
|
||||
|
||||
export function runQueued(execute: string, params?: Parameter, priority = 0) {
|
||||
return queue.add(() => run(execute, params), { priority });
|
||||
return queue.add(() => run(execute, params), { priority }) as Promise<SandboxAdaptedResult>;
|
||||
}
|
||||
|
||||
export * from './sandbox/interface';
|
||||
Reference in new issue
Block a user