Skip to content

Commit e0aa63c

Browse files
authored
Restyle added debug for modified payload (#48)
Restyle added debug for modified payload
2 parents badf9c5 + c0c6592 commit e0aa63c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

metering/handlers/usage_handler.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def main(event, context):
2020

2121
try:
2222
if validate_request(required_keys, request_dict):
23-
logger.info(f"usage record before modification: {request_dict}")
23+
print(f"usage record before modification: {request_dict}")
2424
usage_detail_dict = usage_record_add_verify_fields(request_dict)
25-
logger.info(f"usage record after modification: {usage_detail_dict}")
25+
print(f"usage record after modification: {usage_detail_dict}")
2626
usage_service.save_usage_details(usage_detail_dict)
2727
response = make_response(
2828
StatusCode.SUCCESS_GET_CODE,
@@ -43,4 +43,3 @@ def main(event, context):
4343
)
4444

4545
return response
46-

metering/services.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def save_usage_details(self, usage_details_dict):
4040

4141

4242
class APIUtilityService:
43-
lambda_client = boto3.client('lambda')
43+
44+
def __init__(self):
45+
self.lambda_client = boto3.client('lambda')
4446

4547
def get_user_address(self, group_id, channel_id):
4648
lambda_payload = {

0 commit comments

Comments
 (0)