run_full_comparison orchestrator

Queue pages for background comparison — full pipeline or manual subset re-run

Overview

Queue pages in a cloning job for comparison. A global background worker processes pages one at a time, ordered by backlink importance (most important first). The queue is database-backed, so it survives server restarts. Pages already queued are deduplicated automatically. Supports three modes: 'new' (default — only uncompared pages, triggers post-scan enrichment cascade), 'all' (reset and rerun every page, also triggers cascade), and 'manual' (re-queue without firing the cascade — useful for refreshing a subset of pages without re-running shared-element / nav / design-system / media extraction).

How It Works

  1. Marks eligible pages as 'pending' in the database queue.
  2. A global background worker claims pages one at a time using database locking (FOR UPDATE SKIP LOCKED).
  3. Pages are processed in order of backlink rank (highest first).
  4. Each page is compared using Zyte JS rendering + DataForSEO enrichment.
  5. Failed pages are retried up to 3 times before being marked as errors.
  6. Issues are synced to the database for stateful tracking.
  7. Queue state persists across server restarts — stuck pages are automatically recovered.
  8. Mode 'manual' marks pages with manually_queued=TRUE so the post-scan cascade (deduplication, behaviors, navigation, design system, media extraction, component styles) does NOT re-fire when they finish.

Input Parameters

ParameterTypeRequiredDescription
job_id string required Cloning job ID from discover_all_pages
mode string optional 'new' (default) compares only uncompared pages and triggers the post-scan cascade. 'all' resets and reruns every page (also triggers the cascade). 'manual' re-queues pages without firing any post-scan enrichments.
min_importance number optional Only valid with mode='manual'. Numeric backlink-rank threshold; only pages with backlink_rank > min_importance are re-queued. Mutually exclusive with max_match_score.
max_match_score number optional Only valid with mode='manual'. Pages whose latest overall match_score is strictly below this threshold (0–100) are re-queued. Only previously-compared pages are included — never-compared pages are excluded. Mutually exclusive with min_importance.

What You Get Back

Example Use Case

After discovering 200 pages and building your React clone, call run_full_comparison. It returns immediately with a count of pages queued. Then poll get_migration_status to track background progress as the worker processes each page. After fixes are applied, use mode='all' to rerun every page and verify improvements. For a targeted refresh of high-importance pages without re-running post-scan enrichments, use mode='manual' and min_importance=50.

Tips

Use default mode ('new') for initial comparisons — it skips pages already done.
Use mode 'all' after making fixes to rerun all pages and verify improvements.
Use mode 'manual' (optionally with min_importance) for an admin-style refresh of selected pages — comparisons re-run, but post-scan enrichments stay put.
Failed pages are retried up to 3 times automatically before being marked as errors.
Your plan's page limit applies here — Free plan compares up to 10 pages, Pro up to 500.

Related Tools