mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 18:36:00 +08:00
Update index.ts
This commit is contained in:
parent
da3e6525a9
commit
bfc7f5882e
@ -35,7 +35,9 @@ export async function checkAlerts() {
|
|||||||
const checkWaitingQueue = async () => {
|
const checkWaitingQueue = async () => {
|
||||||
const webScraperQueue = getWebScraperQueue();
|
const webScraperQueue = getWebScraperQueue();
|
||||||
const waitingJobs = await webScraperQueue.getWaitingCount();
|
const waitingJobs = await webScraperQueue.getWaitingCount();
|
||||||
if (waitingJobs > Number(process.env.ALERT_NUM_WAITING_JOBS)) {
|
const paused = await webScraperQueue.getPausedCount();
|
||||||
|
|
||||||
|
if (waitingJobs !== paused && waitingJobs > Number(process.env.ALERT_NUM_WAITING_JOBS)) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`Alert: Number of waiting jobs is over ${process.env.ALERT_NUM_WAITING_JOBS}. Current waiting jobs: ${waitingJobs}.`
|
`Alert: Number of waiting jobs is over ${process.env.ALERT_NUM_WAITING_JOBS}. Current waiting jobs: ${waitingJobs}.`
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user