MCPcopy
hub / github.com/firecrawl/firecrawl / _addScrapeJobToBullMQ

Function _addScrapeJobToBullMQ

apps/api/src/services/queue-jobs.ts:153–186  ·  view source on GitHub ↗
(
  webScraperOptions: ScrapeJobData,
  jobId: string,
  priority: number = 0,
  listenable: boolean = false,
)

Source from the content-addressed store, hash-verified

151}
152
153export async function _addScrapeJobToBullMQ(
154 webScraperOptions: ScrapeJobData,
155 jobId: string,
156 priority: number = 0,
157 listenable: boolean = false,
158): Promise<NuQJob<ScrapeJobData>> {
159 // direct adds bypass the gates; on the FDB backend that's a slotless enqueue
160 if ((await resolveJobBackend(webScraperOptions)) === "fdb") {
161 if (webScraperOptions.mode === "single_urls") {
162 abTestJob(webScraperOptions);
163 }
164 const { jobs } = await fdbEnqueueScrapeJobs(
165 [
166 {
167 jobId,
168 data: webScraperOptions,
169 priority,
170 listenable,
171 backlogTimeoutMs: backlogTimeoutMs(webScraperOptions),
172 },
173 ],
174 webScraperOptions.team_id,
175 { bypassGate: true },
176 );
177 return jobs[0];
178 }
179
180 return _addScrapeJobToBullMQPg(
181 webScraperOptions,
182 jobId,
183 priority,
184 listenable,
185 );
186}
187
188async function _addScrapeJobToBullMQPg(
189 webScraperOptions: ScrapeJobData,

Callers 7

crawlMonitorControllerFunction · 0.90
crawlControllerFunction · 0.90
crawlControllerFunction · 0.90
processPrecrawlJobFunction · 0.90
addKickoffSitemapJobFunction · 0.90
runCrawlTargetFunction · 0.90

Calls 5

resolveJobBackendFunction · 0.90
abTestJobFunction · 0.90
fdbEnqueueScrapeJobsFunction · 0.90
backlogTimeoutMsFunction · 0.85
_addScrapeJobToBullMQPgFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…