Skip to content

Commit f3c6986

Browse files
committed
Fixed config.pys and envs
Signed-off-by: Lalith Kota <kotalalith@gmail.com>
1 parent 72ca5a9 commit f3c6986

File tree

7 files changed

+22
-42
lines changed

7 files changed

+22
-42
lines changed

openg2p-g2p-bridge-bank-connectors/src/openg2p_g2p_bridge_bank_connectors/app.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# ruff: noqa: E402
2-
3-
from .config import Settings
4-
5-
_config = Settings.get_config()
6-
71
from openg2p_fastapi_common.app import Initializer as BaseInitializer
82

93
from .bank_connectors import BankConnectorFactory, ExampleBankConnector

openg2p-g2p-bridge-bank-connectors/src/openg2p_g2p_bridge_bank_connectors/bank_connectors/example_bank_connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919
from ..config import Settings
2020

21-
_config = Settings.get_config()
21+
_config = Settings.get_config(strict=False)
2222
_logger = logging.getLogger(_config.logging_default_logger_name)
2323

2424

openg2p-g2p-bridge-bank-connectors/src/openg2p_g2p_bridge_bank_connectors/config.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44

55
class Settings(BaseSettings):
6-
model_config = SettingsConfigDict(
7-
env_prefix="g2p_bridge_celery_producers_", env_file=".env", extra="allow"
8-
)
9-
10-
db_dbname: str = "openg2p_g2p_bridge_db"
6+
model_config = SettingsConfigDict(env_prefix="g2p_bridge_bank_connector_", env_file=".env", extra="allow")
117

128
funds_available_check_url_example_bank: str = ""
139
funds_block_url_example_bank: str = ""
Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
G2P_BRIDGE_CELERY_TASKS_MAPPER_RESOLVE_API_URL="http://127.0.0.1:8003/sync/resolve"
2-
G2P_BRIDGE_CELERY_TASKS_MAPPER_RESOLVE_RETRIES=3
3-
G2P_BRIDGE_CELERY_TASKS_MAPPER_RESOLVE_RETRY_DELAY=5
4-
G2P_BRIDGE_CELERY_TASKS_DB_DBNAME=openg2p_g2p_bridge_db
5-
G2P_BRIDGE_CELERY_TASKS_BANK_DECONSTRUCT_STRATEGY="bank_(?P<account_number>\d+)_(?P<bank_code>\d+)_(?P<branch_code>\d+)_(?P<account_type>\w+)"
6-
G2P_BRIDGE_CELERY_TASKS_MOBILE_WALLET_DECONSTRUCT_STRATEGY="mobile_(?P<mobile_number>\d+)_(?P<mobile_wallet_provider>\w+)"
7-
G2P_BRIDGE_CELERY_TASKS_EMAIL_WALLET_DECONSTRUCT_STRATEGY="email_(?P<email_address>\w+)_(?P<email_wallet_provider>\w+)"
8-
G2P_BRIDGE_CELERY_TASKS_MAPPER_RESOLVE_ATTEMPTS=3
9-
G2P_BRIDGE_CELERY_TASKS_FUNDS_AVAILABLE_CHECK_ATTEMPTS=3
10-
G2P_BRIDGE_CELERY_TASKS_FUNDS_BLOCKED_ATTEMPTS=3
11-
G2P_BRIDGE_CELERY_TASKS_FUNDS_DISBURSEMENT_ATTEMPTS=3
12-
G2P_BRIDGE_CELERY_TASKS_STATEMENT_PROCESS_ATTEMPTS=3
13-
G2P_BRIDGE_CELERY_TASKS_MAPPER_RESOLVE_FREQUENCY=3600
14-
G2P_BRIDGE_CELERY_TASKS_FUNDS_AVAILABLE_CHECK_FREQUENCY=3600
15-
G2P_BRIDGE_CELERY_TASKS_FUNDS_BLOCKED_FREQUENCY=3600
16-
G2P_BRIDGE_CELERY_TASKS_FUNDS_DISBURSEMENT_FREQUENCY=3600
17-
G2P_BRIDGE_CELERY_TASKS_MT940_PROCESSOR_FREQUENCY=3600
18-
G2P_BRIDGE_CELERY_TASKS_CELERY_BROKER_URL="redis://localhost:6379/0"
19-
G2P_BRIDGE_CELERY_TASKS_CELERY_BACKEND_URL="redis://localhost:6379/0"
1+
G2P_BRIDGE_CELERY_BEAT_DB_HOSTNAME=localhost
2+
G2P_BRIDGE_CELERY_BEAT_DB_PORT=5432
3+
G2P_BRIDGE_CELERY_BEAT_DB_DBNAME=openg2p_g2p_bridge_db
4+
G2P_BRIDGE_CELERY_BEAT_DB_USERNAME=
5+
G2P_BRIDGE_CELERY_BEAT_DB_PASSWORD=
6+
7+
G2P_BRIDGE_CELERY_BEAT_CELERY_BROKER_URL="redis://localhost:6379/0"
8+
G2P_BRIDGE_CELERY_BEAT_CELERY_BACKEND_URL="redis://localhost:6379/0"

openg2p-g2p-bridge-celery-beat-producers/src/openg2p_g2p_bridge_celery_beat_producers/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from openg2p_fastapi_common.config import Settings as BaseSettings
1+
from openg2p_g2p_bridge_bank_connectors.config import Settings as BaseSettings
22
from pydantic_settings import SettingsConfigDict
33

44
from . import __version__
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
G2P_BRIDGE_CELERY_WORKERS_MAPPER_RESOLVE_API_URL="http://127.0.0.1:8003/sync/resolve"
2-
G2P_BRIDGE_CELERY_WORKERS_MAPPER_RESOLVE_RETRIES=3
3-
G2P_BRIDGE_CELERY_WORKERS_MAPPER_RESOLVE_RETRY_DELAY=5
1+
G2P_BRIDGE_CELERY_WORKERS_DB_HOSTNAME=localhost
2+
G2P_BRIDGE_CELERY_WORKERS_DB_PORT=5432
43
G2P_BRIDGE_CELERY_WORKERS_DB_DBNAME=openg2p_g2p_bridge_db
5-
G2P_BRIDGE_CELERY_WORKERS_BANK_FA_DECONSTRUCT_STRATEGY="bank_(?P<account_number>\d+)_(?P<bank_code>\d+)_(?P<branch_code>\d+)_(?P<account_type>\w+)"
6-
G2P_BRIDGE_CELERY_WORKERS_MOBILE_WALLET_DECONSTRUCT_STRATEGY="mobile_(?P<mobile_number>\d+)_(?P<mobile_wallet_provider>\w+)"
7-
G2P_BRIDGE_CELERY_WORKERS_EMAIL_WALLET_DECONSTRUCT_STRATEGY="email_(?P<email_address>\w+)_(?P<email_wallet_provider>\w+)"
4+
G2P_BRIDGE_CELERY_WORKERS_DB_USERNAME=
5+
G2P_BRIDGE_CELERY_WORKERS_DB_PASSWORD=
6+
87
G2P_BRIDGE_CELERY_WORKERS_FUNDS_AVAILABLE_CHECK_URL_EXAMPLE_BANK="http://127.0.0.1:8003/check_funds"
98
G2P_BRIDGE_CELERY_WORKERS_FUNDS_BLOCK_URL_EXAMPLE_BANK="http://127.0.0.1:8003/block_funds"
109
G2P_BRIDGE_CELERY_WORKERS_FUNDS_DISBURSEMENT_URL_EXAMPLE_BANK="http://127.0.0.1:8003/initiate_payment"
10+
1111
G2P_BRIDGE_CELERY_WORKERS_CELERY_BROKER_URL="redis://localhost:6379/0"
1212
G2P_BRIDGE_CELERY_WORKERS_CELERY_BACKEND_URL="redis://localhost:6379/0"
13+
14+
G2P_BRIDGE_CELERY_WORKERS_MAPPER_API_URL="http://127.0.0.1:8003/sync"

openg2p-g2p-bridge-celery-workers/src/openg2p_g2p_bridge_celery_workers/config.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
from openg2p_fastapi_common.config import Settings as BaseSettings
1+
from openg2p_g2p_bridge_bank_connectors.config import Settings as BankConnectorSettings
2+
from openg2p_g2pconnect_mapper_lib.config import Settings as BaseSettings
23
from pydantic_settings import SettingsConfigDict
34

45
from . import __version__
56

67

7-
class Settings(BaseSettings):
8+
class Settings(BankConnectorSettings, BaseSettings):
89
model_config = SettingsConfigDict(env_prefix="g2p_bridge_celery_workers_", env_file=".env", extra="allow")
910
openapi_title: str = "OpenG2P G2P Bridge Celery Workers"
1011
openapi_description: str = """
@@ -21,8 +22,6 @@ class Settings(BaseSettings):
2122
celery_broker_url: str = "redis://localhost:6379/0"
2223
celery_backend_url: str = "redis://localhost:6379/0"
2324

24-
mapper_resolve_api_url: str = ""
25-
2625
bank_fa_deconstruct_strategy: str = r"^account_number:(?P<account_number>.*)\.branch_code:(?P<branch_code>.*)\.bank_code:(?P<bank_code>.*)\.mobile_number:(?P<mobile_number>.*)\.email_address:(?P<email_address>.*)\.fa_type:(?P<fa_type>.*)$"
2726
mobile_wallet_deconstruct_strategy: str = r"^mobile_number:(?P<mobile_number>.*)\.wallet_provider_name:(?P<wallet_provider_name>.*)\.wallet_provider_code:(?P<wallet_provider_code>.*)\.fa_type:(?P<fa_type>.*)$"
2827
email_wallet_deconstruct_strategy: str = r"^email_address:(?P<email_address>.*)\.wallet_provider_name:(?P<wallet_provider_name>.*)\.wallet_provider_code:(?P<wallet_provider_code>.*)\.fa_type:(?P<fa_type>.*)$"

0 commit comments

Comments
 (0)