@detiq/crawler 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-login.js +59 -5
- package/dist/ai-login.js.map +2 -2
- package/dist/crawler.js +2 -2
- package/dist/crawler.js.map +2 -2
- package/dist/job-queue.js +1 -1
- package/dist/job-queue.js.map +2 -2
- package/package.json +1 -1
- package/src/job-queue.ts +4 -1
package/package.json
CHANGED
package/src/job-queue.ts
CHANGED
|
@@ -383,7 +383,10 @@ export async function enqueueJob(type: string, config: any): Promise<string> {
|
|
|
383
383
|
if (type === 'CRAWL' && process.env.JOB_QUEUE_BACKEND === 'sqs') {
|
|
384
384
|
const { sendJobToSqs } = await import('./sqs-queue.js');
|
|
385
385
|
await sendJobToSqs(job.id, tenantId, config);
|
|
386
|
-
} else {
|
|
386
|
+
} else if (process.env.DISABLE_WORKER !== 'true') {
|
|
387
|
+
// Skip inline dispatch when DISABLE_WORKER=true — the dedicated crawler process
|
|
388
|
+
// will pick this up via its poll loop. Inline dispatch in the API container
|
|
389
|
+
// would launch Playwright browsers and crash the API.
|
|
387
390
|
setImmediate(() => claimSpecificJob(job.id).then((claimed) => claimed && dispatchClaimedJob(claimed)));
|
|
388
391
|
}
|
|
389
392
|
|