fix: avoid empty node metrics race in CT (collect on start + poll). Refs EventHub/EventHubBack#47
CI / test (push) Successful in 9m13s
CI / deploy-ift (push) Successful in 2m4s
CI / e2e-ift (push) Failing after 1m51s
CI / deploy-stage (push) Has been skipped
CI / e2e-stage (push) Has been skipped

This commit is contained in:
2026-07-20 01:03:53 +03:00
parent 10f6eef92d
commit 3c6211dd08
2 changed files with 28 additions and 13 deletions
+2 -2
View File
@@ -41,8 +41,8 @@ init([]) ->
mnesia:wait_for_tables([node_metric], 5000),
% Создаём ETS-таблицу для кеширования предыдущих значений io
ets:new(?IO_CACHE_TAB, [named_table, public, set, {keypos, 1}]),
% Запускаем периодический сбор метрик и очистку
schedule_collect(),
% Первый сбор сразу (иначе окно ~5с без метрик), далее по интервалу.
self() ! collect,
schedule_cleanup(),
{ok, #{}}.