Fix monitoring thread when refresh period is -1
Change-Id: Ib26177052e6c7daa2ec9e92e1532cc8dd985493a
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/Dockerfile b/Dockerfile
index 27ab273..ea19e3d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -41,5 +41,5 @@
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 34af39e..8099eb9 100644
--- a/NG-RO/osm_ng_ro/monitor.py
+++ b/NG-RO/osm_ng_ro/monitor.py
@@ -900,6 +900,8 @@
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()