From 5787d9f7a0d714690a5c0f1c0e3c9448ee56fdf8 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Fri, 11 Jul 2025 12:09:24 -0300 Subject: [PATCH] SIENTIAPDE-1148 Refactor Gates activity to correctly sort data by timestamp and update exception handling in worker to include NOSONAR comment for clarity. --- laborious/activities/gates.py | 2 +- laborious/worker/worker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/laborious/activities/gates.py b/laborious/activities/gates.py index 6147382..10d3f64 100644 --- a/laborious/activities/gates.py +++ b/laborious/activities/gates.py @@ -262,7 +262,7 @@ class Gates(BaseActivity): data['prediction_confidence'] = input_data['prediction_confidence'] data['prediction_status'] = 'Good' data['comments'] = "" - data.sort_values(by='timestamp', inplace=True) + data = data.sort_values(by='timestamp') return data.to_dict() diff --git a/laborious/worker/worker.py b/laborious/worker/worker.py index b34e07e..d2879e3 100644 --- a/laborious/worker/worker.py +++ b/laborious/worker/worker.py @@ -95,7 +95,7 @@ async def main(): # 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. await asyncio.gather(*handlers) - except BaseException as e: + except BaseException as e: # NOSONAR logger.error(f"An unhandled exception occurred: {e}") finally: if notification_handler: