Skip to content

Commit

Permalink
Fix rebuilding daily scans
Browse files Browse the repository at this point in the history
We short-circuited upon the first synthetic scan.
  • Loading branch information
ghostwords committed Sep 30, 2024
1 parent d870e40 commit 1612c8e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions initdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import json
import os
import sqlite3
import subprocess

from pathlib import Path

Expand Down Expand Up @@ -188,17 +187,12 @@ def ingest_distributed_scans(badger_swarm_dir, cur):
results.get('tracking_map', {}))

def ingest_daily_scans(cur):
revisions = run("git rev-list HEAD -- results.json".split(" "))
revisions = run("git rev-list HEAD -- log.txt".split(" "))
if not revisions:
return

for rev in revisions.split('\n'):
log_txt = None

try:
log_txt = run(f"git show {rev}:log.txt".split(" "))
except subprocess.CalledProcessError:
continue
log_txt = run(f"git show {rev}:log.txt".split(" "))

# discard most of the log
log_txt = log_txt[:log_txt.index("isiting 1:")]
Expand Down

0 comments on commit 1612c8e

Please sign in to comment.