SIENTIAPDE-1148

Refactor Gates activity to correctly sort data by timestamp and update exception handling in worker to include NOSONAR comment for clarity.
This commit is contained in:
vitor-aignosi
2025-07-11 12:09:24 -03:00
parent dfaab046fc
commit 5787d9f7a0
2 changed files with 2 additions and 2 deletions

View File

@@ -262,7 +262,7 @@ class Gates(BaseActivity):
data['prediction_confidence'] = input_data['prediction_confidence'] data['prediction_confidence'] = input_data['prediction_confidence']
data['prediction_status'] = 'Good' data['prediction_status'] = 'Good'
data['comments'] = "" data['comments'] = ""
data.sort_values(by='timestamp', inplace=True) data = data.sort_values(by='timestamp')
return data.to_dict() return data.to_dict()

View File

@@ -95,7 +95,7 @@ async def main():
# This will run the workers and wait for them to complete. # This will run the workers and wait for them to complete.
# If an exception occurs in any of the worker handlers, it will be propagated here. # If an exception occurs in any of the worker handlers, it will be propagated here.
await asyncio.gather(*handlers) await asyncio.gather(*handlers)
except BaseException as e: except BaseException as e: # NOSONAR
logger.error(f"An unhandled exception occurred: {e}") logger.error(f"An unhandled exception occurred: {e}")
finally: finally:
if notification_handler: if notification_handler: