Skip to content

Commit

Permalink
Merge pull request #735 from anarkiwi/runts
Browse files Browse the repository at this point in the history
fix scanner healthcheck.
  • Loading branch information
anarkiwi authored Jun 20, 2023
2 parents bc10b93 + e97a859 commit 8e952eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/scanhc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PORT=$1
LASTUPDATE=""
for i in {1..5} ; do
UPDATE=$(wget -q -O- http://0.0.0.0:$PORT/|grep -E '^last_freq_update')
UPDATE=$(wget -q -O- http://0.0.0.0:$PORT/|grep -E '^run_timestamp')
if [[ "$UPDATE" == "" ]] ; then
continue
fi
Expand Down
2 changes: 2 additions & 0 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def init_prom_vars():
"tune_overlap": Gauge("tune_overlap", "multiple of samp_rate when retuning"),
"tune_step_fft": Gauge("tune_step_fft", "tune FFT step (0 is use sweep_sec)"),
"sweep_sec": Gauge("sweep_sec", "scan sweep rate in seconds"),
"run_timestamp": Gauge("run_timestamp", "updated when flowgraph is running"),
}
return prom_vars

Expand Down Expand Up @@ -328,6 +329,7 @@ def run_loop(options, prom_vars, wavelearner):
tb.start()
while running and reconfigures == handler.reconfigures:
idle_time = 1
prom_vars["run_timestamp"].set(time.time()),
time.sleep(idle_time)

while reconfigures != handler.reconfigures:
Expand Down

0 comments on commit 8e952eb

Please sign in to comment.