Skip to content

Commit 014b296

Browse files
committed
#236 clear scroll after query
1 parent b9167b2 commit 014b296

File tree

1 file changed

+4
-1
lines changed
  • emf/common/integrations/object_storage

1 file changed

+4
-1
lines changed

emf/common/integrations/object_storage/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ def query_data(metadata_query: dict,
7676
for num, item in enumerate(content_list):
7777
content_list[num] = get_content(item)
7878

79+
# Delete scroll after retrieving data
80+
object_storage.elastic_service.client.clear_scroll(scroll_id=scroll_id)
81+
7982
return content_list
8083

8184

@@ -187,7 +190,7 @@ def get_latest_models_and_download(time_horizon: str,
187190

188191
test_query = {"pmd:TSO": "TERNA",
189192
"pmd:timeHorizon": "2D",
190-
"pmd:scenarioDate": "2024-02-15T22:30:00Z",
193+
"pmd:scenarioDate": "2025-02-15T22:30:00Z",
191194
}
192195
test_filter = "now-2w"
193196
test_response = query_data(test_query, query_filter=test_filter, return_payload=True)

0 commit comments

Comments
 (0)