done with chore #4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user