Retab
Some checks failed
Run tests / test (1.25) (push) Waiting to run
Run tests / build (push) Has been cancelled
Run tests / test (stable) (push) Has been cancelled

This commit is contained in:
2026-02-23 09:09:10 +01:00
parent f50f3d1d69
commit 043247018f
3 changed files with 13 additions and 11 deletions

View File

@@ -42,11 +42,13 @@ jobs:
run: go build -o build/ -v ./cmd/hamview-receiver run: go build -o build/ -v ./cmd/hamview-receiver
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Show env
run: env
- name: Log into Container Registry - name: Log into Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ vars.REGISTRY }}
username: ${{ env.DEPLOY_USER }} username: ${{ vars.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_TOKEN }} password: ${{ secrets.DEPLOY_TOKEN }}
- name: Build and push collector container - name: Build and push collector container
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6

View File

@@ -335,18 +335,18 @@ func (c *Collector) processMeshCorePacket(packet *protocol.Packet) {
last_advert_id last_advert_id
) VALUES ( ) VALUES (
$1, $1,
$2, $2,
$3, $3,
$4, $4,
$5, $5,
$6, $6,
$7, $7,
$8, $8,
$9 $9
) )
ON CONFLICT (public_key) ON CONFLICT (public_key)
DO UPDATE DO UPDATE
SET SET
name = $3, name = $3,
local_time = $4, local_time = $4,
last_heard = $6, last_heard = $6,

6
sql.go
View File

@@ -184,7 +184,7 @@ const (
received_at DESC; received_at DESC;
` `
sqlSelectMeshCorePacketsByRepeaterWindowed = ` sqlSelectMeshCorePacketsByRepeaterWindowed = `
SELECT SELECT
to_timestamp(round(EXTRACT(EPOCH FROM received_at) / $1) * $1) as window, to_timestamp(round(EXTRACT(EPOCH FROM received_at) / $1) * $1) as window,
cast(to_hex(get_byte(path, length(path)-2)) as text) AS repeater, cast(to_hex(get_byte(path, length(path)-2)) as text) AS repeater,
count(id) AS packets count(id) AS packets
@@ -193,8 +193,8 @@ const (
WHERE WHERE
length(path) >= 2 AND length(path) >= 2 AND
received_at >= $2 received_at >= $2
GROUP BY GROUP BY
round(EXTRACT(EPOCH FROM received_at) / $1), round(EXTRACT(EPOCH FROM received_at) / $1),
cast(to_hex(get_byte(path, length(path)-2)) as text); cast(to_hex(get_byte(path, length(path)-2)) as text);
` `
sqlSelectMeshCorePacketPathNodes = ` sqlSelectMeshCorePacketPathNodes = `