Update job-priority.ts

This commit is contained in:
Nicolas 2024-08-27 16:58:28 -03:00
parent 080240e040
commit f0dfcd6a49

View File

@ -37,6 +37,7 @@ export async function getJobPriority({
team_id: string;
basePriority?: number;
}): Promise<number> {
try {
const setKey = SET_KEY_PREFIX + team_id;
// Get the length of the set
@ -81,4 +82,10 @@ export async function getJobPriority({
basePriority + Math.ceil((setLength - bucketLimit) * planModifier)
);
}
} catch (e) {
Logger.error(
`Get job priority failed: ${team_id}, ${plan}, ${basePriority}`
);
return basePriority;
}
}