66from functools import wraps
77from common .log_decorator import generate_and_send_logs
88
9- prefix = "ack_processor"
9+ PREFIX = "ack_processor"
1010STREAM_NAME = os .getenv ("SPLUNK_FIREHOSE_NAME" , "immunisation-fhir-api-internal-dev-splunk-firehose" )
1111
1212
@@ -15,7 +15,7 @@ def convert_message_to_ack_row_logging_decorator(func):
1515
1616 @wraps (func )
1717 def wrapper (message , created_at_formatted_string ):
18- base_log_data = {"function_name" : f"{ prefix } _{ func .__name__ } " , "date_time" : str (datetime .now ())}
18+ base_log_data = {"function_name" : f"{ PREFIX } _{ func .__name__ } " , "date_time" : str (datetime .now ())}
1919 start_time = time .time ()
2020
2121 try :
@@ -55,7 +55,7 @@ def upload_ack_file_logging_decorator(func):
5555 @wraps (func )
5656 def wrapper (* args , ** kwargs ):
5757
58- base_log_data = {"function_name" : f"{ prefix } _{ func .__name__ } " , "date_time" : str (datetime .now ())}
58+ base_log_data = {"function_name" : f"{ PREFIX } _{ func .__name__ } " , "date_time" : str (datetime .now ())}
5959 start_time = time .time ()
6060
6161 # NB this doesn't require a try-catch block as the wrapped function never throws an exception
@@ -76,7 +76,7 @@ def ack_lambda_handler_logging_decorator(func):
7676 @wraps (func )
7777 def wrapper (event , context , * args , ** kwargs ):
7878
79- base_log_data = {"function_name" : f"{ prefix } _{ func .__name__ } " , "date_time" : str (datetime .now ())}
79+ base_log_data = {"function_name" : f"{ PREFIX } _{ func .__name__ } " , "date_time" : str (datetime .now ())}
8080 start_time = time .time ()
8181
8282 try :
0 commit comments