@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@detiq/crawler",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
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