Make system.asynchronous_metrics available just after start

This commit is contained in:
Azat Khuzhin 2021-01-29 22:09:34 +03:00
parent 585874bf46
commit 1fe003b85e

View File

@ -58,6 +58,9 @@ public:
/// Separate method allows to initialize the `servers` variable beforehand.
void start()
{
/// Update once right now, to make metrics available just after server start
/// (without waiting for asynchronous_metrics_update_period_s).
update();
thread = std::make_unique<ThreadFromGlobalPool>([this] { run(); });
}