Update repeater BM checks precendence
This commit is contained in:
parent
10da490762
commit
94e7657e7f
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue