Retab
This commit is contained in:
@@ -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
|
||||||
|
|||||||
12
collector.go
12
collector.go
@@ -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
6
sql.go
@@ -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 = `
|
||||||
|
|||||||
Reference in New Issue
Block a user