From: garciadeblas Date: Mon, 19 Aug 2024 08:01:08 +0000 (+0000) Subject: Fix monitoring thread when refresh period is -1 X-Git-Tag: release-v16.0-start~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F14517%2F1;p=osm%2FRO.git Fix monitoring thread when refresh period is -1 Change-Id: Ib26177052e6c7daa2ec9e92e1532cc8dd985493a Signed-off-by: garciadeblas --- diff --git a/Dockerfile b/Dockerfile index 27ab273a..ea19e3dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,5 +41,5 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ python3-pip \ tox -ENV LC_ALL C.UTF-8 -ENV LANG C.UTF-8 +ENV LC_ALL=C.UTF-8 +ENV LANG=C.UTF-8 diff --git a/NG-RO/osm_ng_ro/monitor.py b/NG-RO/osm_ng_ro/monitor.py index 34af39ec..8099eb98 100644 --- a/NG-RO/osm_ng_ro/monitor.py +++ b/NG-RO/osm_ng_ro/monitor.py @@ -900,6 +900,8 @@ def start_monitoring(config: dict): instance = MonitorVms(config) period = instance.refresh_config.active instance.run() + if period == -1: + period = 10 * 24 * 60 * 60 # 10 days (big enough) monitoring_task = threading.Timer(period, start_monitoring, args=(config,)) monitoring_task.start()