Retab
This commit is contained in:
@@ -42,11 +42,13 @@ jobs:
|
||||
run: go build -o build/ -v ./cmd/hamview-receiver
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Show env
|
||||
run: env
|
||||
- name: Log into Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.DEPLOY_USER }}
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ vars.DEPLOY_USER }}
|
||||
password: ${{ secrets.DEPLOY_TOKEN }}
|
||||
- name: Build and push collector container
|
||||
uses: docker/build-push-action@v6
|
||||
|
||||
12
collector.go
12
collector.go
@@ -335,18 +335,18 @@ func (c *Collector) processMeshCorePacket(packet *protocol.Packet) {
|
||||
last_advert_id
|
||||
) VALUES (
|
||||
$1,
|
||||
$2,
|
||||
$3,
|
||||
$4,
|
||||
$5,
|
||||
$2,
|
||||
$3,
|
||||
$4,
|
||||
$5,
|
||||
$6,
|
||||
$7,
|
||||
$8,
|
||||
$9
|
||||
)
|
||||
)
|
||||
ON CONFLICT (public_key)
|
||||
DO UPDATE
|
||||
SET
|
||||
SET
|
||||
name = $3,
|
||||
local_time = $4,
|
||||
last_heard = $6,
|
||||
|
||||
6
sql.go
6
sql.go
@@ -184,7 +184,7 @@ const (
|
||||
received_at DESC;
|
||||
`
|
||||
sqlSelectMeshCorePacketsByRepeaterWindowed = `
|
||||
SELECT
|
||||
SELECT
|
||||
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,
|
||||
count(id) AS packets
|
||||
@@ -193,8 +193,8 @@ const (
|
||||
WHERE
|
||||
length(path) >= 2 AND
|
||||
received_at >= $2
|
||||
GROUP BY
|
||||
round(EXTRACT(EPOCH FROM received_at) / $1),
|
||||
GROUP BY
|
||||
round(EXTRACT(EPOCH FROM received_at) / $1),
|
||||
cast(to_hex(get_byte(path, length(path)-2)) as text);
|
||||
`
|
||||
sqlSelectMeshCorePacketPathNodes = `
|
||||
|
||||
Reference in New Issue
Block a user