From c407653d0a7f1b6ae9354ced72fc5dc6ad81f321 Mon Sep 17 00:00:00 2001 From: akvlad Date: Tue, 19 Mar 2024 13:47:30 +0200 Subject: [PATCH] fix: await --- lib/db/clickhouse_alerting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db/clickhouse_alerting.js b/lib/db/clickhouse_alerting.js index 25749b65..f2b0765a 100644 --- a/lib/db/clickhouse_alerting.js +++ b/lib/db/clickhouse_alerting.js @@ -101,7 +101,7 @@ module.exports.getAlertRules = async (limit, offset) => { const _limit = limit ? `LIMIT ${limit}` : '' const _offset = offset ? `OFFSET ${offset}` : '' const mark = Math.random() - const res = rawRequest( + const res = await rawRequest( 'SELECT fingerprint, argMax(name, inserted_at) as name, argMax(value, inserted_at) as value ' + `FROM ${DATABASE_NAME()}.settings${dist} ` + `WHERE type == 'alert_rule' AND ${mark} == ${mark} ` +