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
@@ -80,8 +80,9 @@ export async function postInit() {
|
||||
logger.debug('Record not found: %o', t);
|
||||
return;
|
||||
}
|
||||
(new JudgeTask(session, Object.assign(rdoc, t))).handle().catch(logger.error);
|
||||
await (new JudgeTask(session, Object.assign(rdoc, t))).handle().catch(logger.error);
|
||||
};
|
||||
TaskModel.consume({ type: 'judge' }, handle);
|
||||
const parallelism = Math.max(getConfig('parallelism'), 2);
|
||||
for (let i = 1; i < parallelism; i++) TaskModel.consume({ type: 'judge' }, handle);
|
||||
TaskModel.consume({ type: 'judge', priority: { $gt: -50 } }, handle);
|
||||
}
|
||||
Reference in new issue
Block a user