From 7f8b7a3b1c5dc31dd53eb78f5c28e8b7ceec01ac Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Fri, 19 Dec 2025 15:51:06 -0300 Subject: [PATCH] SIENTIAPDE-1445 Update requirements.txt and core_scouter.py - Commented out the Git repository reference for sientia-dataops-library in requirements.txt and replaced it with a local path. - Modified the condition for data export in core_scouter.py to check for affected rows, enhancing data handling logic. --- requirements.txt | 3 ++- scouter/workflow/sub_workflows/core_scouter.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5559f7f..5c6cd53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ psycopg2-binary sqlalchemy redis pymongo -git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.7.0 +# git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.7.0 +/home/grezewave/Documents/projects/sientia/sientia-dataops-library prometheus-client pycurl \ No newline at end of file diff --git a/scouter/workflow/sub_workflows/core_scouter.py b/scouter/workflow/sub_workflows/core_scouter.py index 41e3b0d..015d11f 100644 --- a/scouter/workflow/sub_workflows/core_scouter.py +++ b/scouter/workflow/sub_workflows/core_scouter.py @@ -111,12 +111,13 @@ class CoreScouter: 'data': held_data, 'timestamp_conversion': {'column': 'timestamp', 'format': DATETIME_FORMAT_WITH_TZ}, 'on_conflict': 'ignore', + 'unique_columns': ['model_id', 'timestamp', 'variable'], }, retry_policy=retry_policy, start_to_close_timeout=timedelta(seconds=60), ) - if not data_exported: + if data_exported.get('affected_rows', 0 ) <= 0: return await workflow.execute_activity_method(