From 94e7657e7f5adc25fc9ae670aca986d0570aa62a Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Mon, 9 Feb 2026 23:53:19 +0100 Subject: [PATCH] Update repeater BM checks precendence --- bmdevice.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bmdevice.go b/bmdevice.go index 3f97bf8..e192210 100644 --- a/bmdevice.go +++ b/bmdevice.go @@ -57,7 +57,8 @@ func runBMDeviceSync(db *sql.DB) { // Only poll repeaters that haven't been polled in the last 3 days rows, err := db.Query(`SELECT id, callsign, freq_tx, freq_rx FROM repeaters WHERE network = 'Brandmeister' AND hotspot = 0 - AND (last_polled IS NULL OR last_polled < NOW() - INTERVAL '3 days')`) + AND (last_polled IS NULL OR last_polled < NOW() - INTERVAL '3 days') + ORDER BY CASE WHEN LEFT(id::text, 3) = '262' THEN 0 WHEN LEFT(id::text, 1) = '2' THEN 1 ELSE 2 END, callsign`) if err != nil { log.Printf("BM device sync: failed to query repeaters: %v", err) return