mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-13 09:28:58 +08:00
Update job-priority.ts
This commit is contained in:
parent
080240e040
commit
f0dfcd6a49
@ -37,6 +37,7 @@ export async function getJobPriority({
|
|||||||
team_id: string;
|
team_id: string;
|
||||||
basePriority?: number;
|
basePriority?: number;
|
||||||
}): Promise<number> {
|
}): Promise<number> {
|
||||||
|
try {
|
||||||
const setKey = SET_KEY_PREFIX + team_id;
|
const setKey = SET_KEY_PREFIX + team_id;
|
||||||
|
|
||||||
// Get the length of the set
|
// Get the length of the set
|
||||||
@ -81,4 +82,10 @@ export async function getJobPriority({
|
|||||||
basePriority + Math.ceil((setLength - bucketLimit) * planModifier)
|
basePriority + Math.ceil((setLength - bucketLimit) * planModifier)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
Logger.error(
|
||||||
|
`Get job priority failed: ${team_id}, ${plan}, ${basePriority}`
|
||||||
|
);
|
||||||
|
return basePriority;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user