From: tierno Date: Wed, 30 Sep 2020 08:01:05 +0000 (+0000) Subject: fix 1242: increase retries while adding prometheus jobs X-Git-Tag: v8.0.2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f09cbe79d1982c4d2f6abc2416c7f8044d0c376f;p=osm%2FLCM.git fix 1242: increase retries while adding prometheus jobs It is retried more frequently and 20 times instead of 4 Change-Id: I4ab5a2dfe9c60f9b88da7f2784003ef89a7f676d Signed-off-by: tierno --- diff --git a/osm_lcm/prometheus.py b/osm_lcm/prometheus.py index 8de81d7b..2be94afc 100644 --- a/osm_lcm/prometheus.py +++ b/osm_lcm/prometheus.py @@ -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()