Refactors hardcoded config vars.

This commit is contained in:
PhilipWafula 2021-06-26 18:51:25 +03:00
parent 282fd2ff52
commit 9dd7ec88fd
Signed by: mango-habanero
GPG Key ID: B00CE9034DA19FB7
3 changed files with 17 additions and 5 deletions

View File

@ -117,7 +117,13 @@ def register_ussd(i, u):
phone_object = phonenumbers.parse(u.tel)
phone = phonenumbers.format_number(phone_object, phonenumbers.PhoneNumberFormat.E164)
logg.debug('tel {} {}'.format(u.tel, phone))
req = build_ussd_request(phone, 'localhost', 63315, '*483*46#', '', '')
req = build_ussd_request(
phone,
'localhost',
config.get('CIC_USER_USSD_SVC_SERVICE_PORT'),
config.get('APP_SERVICE_CODE'),
'',
'')
response = urllib.request.urlopen(req)
response_data = response.read().decode('utf-8')
state = response_data[:3]

View File

@ -7,3 +7,4 @@ approval_escrow_address =
chain_spec = evm:bloxberg:8996
tx_retry_delay =
trust_address = 0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C
user_ussd_svc_service_port=

View File

@ -1,5 +1,10 @@
[database]
name = sempo
host = localhost
port = 5432
user = postgres
NAME=sempo
USER=postgres
PASSWORD=
HOST=localhost
PORT=5432
ENGINE=postgresql
DRIVER=psycopg2
DEBUG=0
POOL_SIZE=1