diff --git a/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/app.py b/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/app.py index bf63cb1..e4b6055 100644 --- a/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/app.py +++ b/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/app.py @@ -36,8 +36,8 @@ def get_engine(): celery_app = Celery( "example_bank_celery_tasks", - broker="redis://localhost:6379/0", - backend="redis://localhost:6379/0", + broker=_config.celery_broker_url, + backend=_config.celery_backend_url, include=["openg2p_g2p_bridge_example_bank_celery.tasks"], ) diff --git a/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/config.py b/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/config.py index dbf5d97..e7653eb 100644 --- a/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/config.py +++ b/openg2p-g2p-bridge-example-bank-celery/src/openg2p_g2p_bridge_example_bank_celery/config.py @@ -20,5 +20,8 @@ class Settings(BaseSettings): db_dbname: str = "example_bank_db" db_driver: str = "postgresql" + celery_broker_url: str = "redis://localhost:6379/0" + celery_backend_url: str = "redis://localhost:6379/0" + process_payment_frequency: int = 3600 payment_initiate_attempts: int = 3