25 lines
681 B
Python
25 lines
681 B
Python
from app import create_app
|
|
from app.integrations import KafkaIntegration
|
|
from app.config import settings
|
|
from app.utils.logger import logger
|
|
|
|
app = create_app()
|
|
|
|
if __name__ != "__main__":
|
|
#
|
|
# kafka = KafkaIntegration()
|
|
#
|
|
# logger.info("Starting Kafka consumer...")
|
|
# while True:
|
|
# message = kafka.receive_disbursement_messages(
|
|
# topic=settings.KAFKA_PAYMENT_TOPIC, timeout=settings.KAFKA_TIMEOUT
|
|
# )
|
|
#
|
|
# if message:
|
|
# logger.info(f"Processed message: {message}")
|
|
# else:
|
|
# logger.info("No message received within timeout")
|
|
|
|
# Expose WSGI app instance for Gunicorn
|
|
wsgi_app = app
|