diff --git a/app/integrations/kafka.py b/app/integrations/kafka.py index 257c71f..385937a 100644 --- a/app/integrations/kafka.py +++ b/app/integrations/kafka.py @@ -6,6 +6,9 @@ import requests class KafkaIntegration: + + BASE_URL = settings.SIMBRELLA_BASE_URL + _consumer = None _consumer_config = { @@ -83,9 +86,7 @@ class KafkaIntegration: logger.info("Kafka consumer closed") @staticmethod - def _call_disbursement_endpoint( - message, endpoint_url="http://localhost:8000/loans/disbursement" - ): + def _call_disbursement_endpoint(message, endpoint_url=f"{BASE_URL}/Disbursement"): """Call an HTTP endpoint with the received message""" try: response = requests.post(endpoint_url, json=message, timeout=5)