runtime: disable trace/screenshot/DOM snapshot saving

Tracing was accumulating 45GB+ of data (traces) + 5.6GB (dom) + 1.3GB
(screenshots) on every run. These artifacts are only useful during
development; remove them from the production run pipeline entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
I Luk Kim 3 months ago
parent 37e5b59126
commit e13a25b3d5

@ -95,8 +95,6 @@ class RunOrchestrator:
query = merge_query(self.cfg, manifest) query = merge_query(self.cfg, manifest)
run_id = str(uuid.uuid4())[:8] run_id = str(uuid.uuid4())[:8]
from gimme_job.utils.paths import screenshot_path, dom_snapshot_path, trace_path
try: try:
if manifest.search_override.multi_keyword_mode == "separate" and query.keywords: if manifest.search_override.multi_keyword_mode == "separate" and query.keywords:
# Run one scrape per keyword and merge results # Run one scrape per keyword and merge results
@ -153,7 +151,6 @@ class RunOrchestrator:
from gimme_job.runtime.browser import BrowserManager from gimme_job.runtime.browser import BrowserManager
from gimme_job.runtime.dedupe import deduplicate_in_batch, ensure_fingerprints from gimme_job.runtime.dedupe import deduplicate_in_batch, ensure_fingerprints
from gimme_job.runtime.extractor import apply_post_filters from gimme_job.runtime.extractor import apply_post_filters
from gimme_job.utils.paths import dom_snapshot_path, screenshot_path, trace_path
headless = manifest.browser.headless_on_run headless = manifest.browser.headless_on_run
profile = manifest.browser.profile_name or self.cfg.runtime.profile_name profile = manifest.browser.profile_name or self.cfg.runtime.profile_name
@ -167,7 +164,6 @@ class RunOrchestrator:
try: try:
context = bm.open_context() context = bm.open_context()
bm.start_tracing()
page = bm.new_page() page = bm.new_page()
# Set timeouts # Set timeouts
@ -260,30 +256,7 @@ class RunOrchestrator:
break break
time.sleep(0.5) time.sleep(0.5)
# Take screenshot
try:
ss_path = screenshot_path(site_id, run_id)
page.screenshot(path=str(ss_path), full_page=False)
result.screenshot_path = ss_path
except Exception as e:
logger.debug(f"[{site_id}] Screenshot failed: {e}")
# Save DOM snapshot
try:
dom_path = dom_snapshot_path(site_id, run_id)
dom_path.parent.mkdir(parents=True, exist_ok=True)
dom_path.write_text(page.content(), encoding="utf-8")
result.dom_snapshot_path = dom_path
except Exception as e:
logger.debug(f"[{site_id}] DOM snapshot failed: {e}")
finally: finally:
try:
t_path = trace_path(site_id, run_id)
bm.save_trace(t_path)
result.trace_path = t_path
except Exception:
pass
bm.close() bm.close()
# Normalize cards # Normalize cards

Loading…
Cancel
Save