Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)
Python acoustic-geolocationads-baircraft-trackingairplaneaudio-forensicsdoppler-effectdoppler-shiftgeolocationosintsignal-processing
fix(cli): show fine worker ledger activity (#335)
Cinna Davis9b9ae1ec2fe3
diff --git a/src/dopplergeist/cli.py b/src/dopplergeist/cli.pyindex be3cc7c..b4dbb6a 100644--- a/src/dopplergeist/cli.py+++ b/src/dopplergeist/cli.py@@ -224,9 +224,10 @@ def main():if previous_count is not None and count >= previous_count and now > previous_time:rate=f", file-count rate {(count-previous_count)*60/(now-previous_time):.1f} files/min"search_files=tiles+fine_files- # Support diagnostics and retention writes show activity, not- # completed payloads. Keep them outside the count and rate.+ # Support diagnostics, worker ledgers and retention writes show+ # activity, not completed payloads. Keep them outside the count and rate.activity_files=(search_files+list((search/"support").glob("*.json"))+ +list((search/".tile-workers").glob("*.sqlite*"))+[search/"retention.sqlite", search/"retention.sqlite-wal"])modified={}for path in activity_files:diff --git a/tests/test_real_cli_watch.py b/tests/test_real_cli_watch.pyindex 34bbe93..9b34032 100644--- a/tests/test_real_cli_watch.py+++ b/tests/test_real_cli_watch.py@@ -17,6 +17,8 @@ def test_watch_real_job_and_interrupt_only_the_watcher():job = Path(source)if json.loads((job / 'result.json').read_text())['status'] != 'running':pytest.skip('the real upload is not currently running')+ worker_files = list((job / 'search' / '.tile-workers').glob('*.sqlite*'))+ recent_worker_write = any(time.time() - path.stat().st_mtime < 30 for path in worker_files)base = [sys.executable, '-m', 'dopplergeist.cli', 'job', job.name, '--jobs', str(job.parent)]once = subprocess.run(base, check=True, capture_output=True, text=True)assert json.loads(once.stdout)['job_id'] == job.name@@ -36,6 +38,8 @@ def test_watch_real_job_and_interrupt_only_the_watcher():assert 'newest matching file modified' in stderrassert 'newest search write ' in stderrassert 'unverified file activity' in stderr+ if recent_worker_write:+ assert '.tile-workers/' in stderrassert 'Stopped watching; the job continues.' in stderrassert json.loads((job / 'result.json').read_text())['status'] == 'running'