fix 1242: increase retries while adding prometheus jobs
[osm/LCM.git] / osm_lcm / prometheus.py
index 8de81d7..2be94af 100644 (file)
@@ -101,10 +101,10 @@ class Prometheus:
         :param remove_jobs: list with jobs to remove [job_id_1, job_id_2]
         :return: result. If false prometheus denies this configuration. Exception on error
         """
-        for retry in range(4):
+        for retry in range(20):
             result = True
             if retry:  # first time do not wait
-                await asyncio.sleep(self.PROMETHEUS_LOCKED_TIME / 2, loop=self.loop)
+                await asyncio.sleep(4 + retry, loop=self.loop)
 
             # lock database
             now = time()