From fc77ab99a357fc4cad27bdeb051d9c273f38941a Mon Sep 17 00:00:00 2001 From: ntnhaatj Date: Tue, 17 May 2022 22:12:29 +0700 Subject: [PATCH] fix: adjust backoff factor --- schemas/schemas_registry.py | 2 +- svc/helpers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/schemas_registry.py b/schemas/schemas_registry.py index 10b34a6..724d97e 100644 --- a/schemas/schemas_registry.py +++ b/schemas/schemas_registry.py @@ -23,7 +23,7 @@ def __init__(self, base_url): @backoff.on_exception(backoff.expo, (requests.exceptions.RequestException, SchemaRegistryError, ), - factor=10, + factor=5, max_tries=5) def fetch_all_schemas(self): logging.info(f"fetching schema registry") diff --git a/svc/helpers.py b/svc/helpers.py index ad712f4..867e518 100644 --- a/svc/helpers.py +++ b/svc/helpers.py @@ -18,7 +18,7 @@ @backoff.on_exception(backoff.expo, (Exception,), - factor=10, + factor=5, max_tries=5) def configure_mysql_connectors(conf, hostname='localhost', port='8083'): logging.info("configuring MySQL Kafka connectors")