Openstatus www.openstatus.dev

Tinybird improvement (#74)

* chore: update tinybird

* chore: update tinybird

authored by

Thibault Le Ouay and committed by
GitHub
aec1b7b3 e2c96e93

+9 -8
+1
.gitignore
··· 38 38 # packages 39 39 dist 40 40 packages/emails/.react-email 41 + packages/tinybird/.tinyb
+1 -1
packages/tinybird/datasources/ping_response.datasource
··· 13 13 `cronTimestamp` Nullable(Int64) `json:$.cronTimestamp` 14 14 15 15 ENGINE "MergeTree" 16 - ENGINE_SORTING_KEY "id, timestamp, url, workspaceId" 16 + ENGINE_SORTING_KEY "id, timestamp, url, workspaceId"
+2 -4
packages/tinybird/pipes/monitor_list.pipe
··· 1 1 VERSION 1 2 2 3 - TOKEN "monitor_list__v0_endpoint_read_0539" READ 4 - 5 - NODE monitor_list__v1_0 3 + NODE monitor_list_0 6 4 SQL > 7 5 8 6 % ··· 13 11 cronTimestamp 14 12 {% end %} 15 13 AS cronTimestamp, ROUND(AVG(latency)) as avgLatency, COUNT(*) as count, COUNT(CASE WHEN statusCode BETWEEN 200 AND 299 THEN 1 ELSE NULL END) as ok 16 - FROM ping_response__v2 14 + FROM ping_response 17 15 WHERE monitorId = {{ String(monitorId, 'openstatusPing') }} AND cronTimestamp IS NOT NULL 18 16 GROUP BY cronTimestamp 19 17 ORDER BY cronTimestamp DESC
+5 -3
packages/tinybird/pipes/response_list.pipe
··· 1 1 VERSION 2 2 2 3 - NODE response_list__v2_0 3 + NODE response_list_0 4 4 SQL > 5 5 6 6 % 7 7 SELECT * 8 - FROM ping_response__v2 8 + FROM ping_response 9 9 WHERE monitorId = {{ String(monitorId, 'openstatusPing') }} 10 10 {% if defined(region) %} 11 11 AND region = {{ String(region) }} ··· 20 20 AND cronTimestamp <= {{ Int64(toDate) }} 21 21 {% end %} 22 22 ORDER BY timestamp DESC 23 - LIMIT {{Int32(limit, 100)}} 23 + LIMIT {{Int32(limit, 100)}} 24 + 25 +