SIENTIAPDE-1084
Refactor debug logging in gates.py to remove f-string usage for improved consistency and readability
This commit is contained in:
@@ -416,17 +416,17 @@ class Gates(BaseActivity):
|
||||
data['timestamp'] = input_data['timestamp']
|
||||
else:
|
||||
self.debug(
|
||||
f"Data has timestamp, sorting data by timestamp", metadata)
|
||||
"Data has timestamp, sorting data by timestamp", metadata)
|
||||
|
||||
# If policy_type is lts, we need to sort the data by timestamp descending and take the first policy_value rows
|
||||
if policy_type == 'lts':
|
||||
self.debug(
|
||||
f"Sorting data by timestamp descending", metadata)
|
||||
"Sorting data by timestamp descending", metadata)
|
||||
data = data.sort_values(by='timestamp', ascending=False)
|
||||
# If policy_type is erl, we need to sort the data by timestamp ascending and take the first policy_value rows
|
||||
elif policy_type == 'erl':
|
||||
self.debug(
|
||||
f"Sorting data by timestamp ascending", metadata)
|
||||
"Sorting data by timestamp ascending", metadata)
|
||||
data = data.sort_values(by='timestamp', ascending=True)
|
||||
else:
|
||||
self.error(
|
||||
|
||||
Reference in New Issue
Block a user