mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-16 18:25:56 +08:00
Nick:
This commit is contained in:
parent
47123be783
commit
f797380112
@ -49,7 +49,7 @@ export async function checkAlerts() {
|
||||
};
|
||||
|
||||
const checkAll = async () => {
|
||||
// await checkActiveJobs();
|
||||
await checkActiveJobs();
|
||||
await checkWaitingQueue();
|
||||
};
|
||||
|
||||
|
@ -115,6 +115,20 @@ workerFun(scrapeQueueName, processJobInternal);
|
||||
async function processJob(job: Job, token: string) {
|
||||
Logger.info(`🐂 Worker taking job ${job.id}`);
|
||||
|
||||
// Check if the job URL is researchhub and block it immediately
|
||||
// TODO: remove this once solve the root issue
|
||||
if (job.data.url && job.data.url.includes("researchhub.com")) {
|
||||
Logger.info(`🐂 Blocking job ${job.id} with URL ${job.data.url}`);
|
||||
const data = {
|
||||
success: false,
|
||||
docs: [],
|
||||
project_id: job.data.project_id,
|
||||
error: "URL is blocked: researchhub.com",
|
||||
};
|
||||
await job.moveToCompleted(data.docs, token, false);
|
||||
return data;
|
||||
}
|
||||
|
||||
try {
|
||||
job.updateProgress({
|
||||
current: 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user