Skip to content

Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)

fix(#10): report coarse split activity in job watch (#373)

Cinna Davis955569446245
diff --git a/docs/PRODUCT.md b/docs/PRODUCT.md
index a1e33e0..7bd8d72 100644
--- a/docs/PRODUCT.md
+++ b/docs/PRODUCT.md
@@ -92,8 +92,10 @@ count/rate of matching coarse and fine search filenames, the newest matching
file modification age, and the job status-file age on standard error. These are
unverified filesystem indicators: the watcher does not validate payload hashes
or retention evidence, and the file-count rate is not a completed-work rate or
-ETA. Remotely staged work appears after it is imported. Pressing Ctrl-C stops
-the watcher without cancelling the analysis.
+ETA. Coarse split-marker counts and rates show recorded subdivisions, not the number of
+pending leaves or evidence that the search is converging. Remotely staged work
+appears after it is imported. Pressing Ctrl-C stops the watcher without
+cancelling the analysis.
Direct `analyze` and `resume --jobs` print the terminal result as JSON and exit
with status 1 for a failed job or 130 for cancellation. They exit 0 for
diff --git a/src/dopplergeist/cli.py b/src/dopplergeist/cli.py
index d19b215..8a062f4 100644
--- a/src/dopplergeist/cli.py
+++ b/src/dopplergeist/cli.py
@@ -258,7 +258,7 @@ def main():
elif args.command=="job":
from .jobs import read_json
directory=Path(args.jobs)/args.job_id
- previous_count=previous_time=previous_fine_support_count=None
+ previous_count=previous_time=previous_fine_support_count=previous_split_count=None
try:
while True:
try:
@@ -271,6 +271,7 @@ def main():
tiles=[path for path in search.glob("tile-*.json") if not path.name.endswith(".error.json")]
fine_files=[path for path in search.glob("fine-tile-*.json")
if not path.name.endswith(".error.json")]
+ split_count=sum(1 for _ in search.glob("split-*.json"))
support_files=list((search/"support").glob("*.json"))
fine_support_files=[path for path in support_files if path.name.startswith("fine-")]
fine_support_count=len(fine_support_files)
@@ -291,6 +292,10 @@ def main():
rate=""
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"
+ split_rate=""
+ if previous_split_count is not None and split_count >= previous_split_count and now > previous_time:
+ split_rate=(f", coarse split-marker rate "
+ f"{(split_count-previous_split_count)*60/(now-previous_time):.1f} markers/min")
fine_support_rate=""
if (previous_fine_support_count is not None
and fine_support_count >= previous_fine_support_count and now > previous_time):
@@ -323,13 +328,14 @@ def main():
if activity is not None else "")
print(f"{value['status']} ({value.get('stage', 'no stage')}{progress_text}{activity_text}): "
f"{count} search files observed (unverified: {len(tiles)} coarse, "
- f"{len(fine_files)} fine){rate}{file_age}, "
+ f"{len(fine_files)} fine, {split_count} coarse split markers){rate}{split_rate}{file_age}, "
f"{fine_support_count} fine support records observed (unverified)"
f"{fine_support_rate}{fine_support_age}{activity_age}, "
f"status updated {age_text(result_age)} ago",file=sys.stderr,flush=True)
if value["status"] in {"needs_input", "succeeded", "inconclusive", "failed", "cancelled"}:
break
- previous_count,previous_time,previous_fine_support_count=count,now,fine_support_count
+ previous_count,previous_time,previous_fine_support_count,previous_split_count=(
+ count,now,fine_support_count,split_count)
time.sleep(args.interval)
except KeyboardInterrupt:
print("Stopped watching; the job continues.",file=sys.stderr)