From 905a7a7bebb1be02dd0b86735407912b54bfcda1 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 29 Mar 2022 08:46:43 -0700 Subject: [PATCH] hydra-queue-runner: read metrics port from `queue_runner_metrics_port` config --- src/hydra-queue-runner/hydra-queue-runner.cc | 2 +- src/hydra-queue-runner/state.hh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 062b0644..40babf33 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -47,8 +47,8 @@ State::State(uint16_t metricsPort) , maxLogSize(config->getIntOption("max_log_size", 64ULL << 20)) , uploadLogsToBinaryCache(config->getBoolOption("upload_logs_to_binary_cache", false)) , rootsDir(config->getStrOption("gc_roots_dir", fmt("%s/gcroots/per-user/%s/hydra-roots", settings.nixStateDir, getEnvOrDie("LOGNAME")))) + , metricsPort(config->getIntOption("queue_runner_metrics_port", metricsPort)) , registry(std::make_shared()) - , metricsPort(metricsPort) { hydraData = getEnvOrDie("HYDRA_DATA"); diff --git a/src/hydra-queue-runner/state.hh b/src/hydra-queue-runner/state.hh index 4add0dbd..5299edea 100644 --- a/src/hydra-queue-runner/state.hh +++ b/src/hydra-queue-runner/state.hh @@ -434,10 +434,10 @@ private: via gc_roots_dir. */ nix::Path rootsDir; - std::shared_ptr registry; - uint16_t metricsPort; + std::shared_ptr registry; + public: State(uint16_t metricsPort);