From 6c72d5e3a7bef0c8ab155b23e954cc764a6ef381 Mon Sep 17 00:00:00 2001 From: Vermaas <vermaas@astron.nl> Date: Tue, 16 Jan 2024 14:31:32 +0100 Subject: [PATCH] better ingestq filter and restore previous functionality --- atdb/atdb/settings/base.py | 2 +- atdb/taskdatabase/views.py | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/atdb/atdb/settings/base.py b/atdb/atdb/settings/base.py index ae95daa1..31e14227 100644 --- a/atdb/atdb/settings/base.py +++ b/atdb/atdb/settings/base.py @@ -210,7 +210,7 @@ ACTIVE_STATUSSES = ['staging','staged','processing','processed','validated','sto STATUSSES_WITH_DATA = ['staged','fetching','fetched','processing','processed','validated','storing','stored','scrubbing','scrubbed','archiving','archived'] AGGREGATES = ['failed','active','total'] -QUERY_LIMIT_MULTI_CHANGE = 5000 +QUERY_LIMIT_MULTI_CHANGE = 10000 MAX_MONITORING_HISTORY_HOURS = 7 * 24 SERVICES_LATE_WARNING_SECONDS = 1800 diff --git a/atdb/taskdatabase/views.py b/atdb/taskdatabase/views.py index 6e395d4c..85f3cf55 100644 --- a/atdb/taskdatabase/views.py +++ b/atdb/taskdatabase/views.py @@ -180,15 +180,10 @@ class QueryView(SingleTableMixin, FilterView): def get_table_data(self): # https://stackoverflow.com/questions/7763115/django-passing-data-between-views - count = self.object_list.count() - - # nv4jan2024, removed the user setting for this. - # It was never used and potentially overcomplicates things elsewhere. - #try: - # limit = int(Configuration.objects.get(key='multi_change_limit').value) - #except: - # limit = settings.QUERY_LIMIT_MULTI_CHANGE + #nv:16jan2024, this would be scary, but perhaps needed + #how large is the list that can go on the session? + #query_list_of_ids = list(self.object_list.values_list('id')) query_list_of_ids = list(self.object_list.values_list('id'))[:settings.QUERY_LIMIT_MULTI_CHANGE] -- GitLab