From 4aca0840b42d20726db5a8e6ef239e2bb3fd800a Mon Sep 17 00:00:00 2001
From: Vermaas <vermaas@astron.nl>
Date: Tue, 2 Apr 2024 09:14:17 +0200
Subject: [PATCH] comment out 'hold' for this moment

---
 atdb/taskdatabase/models.py                              | 8 +++++++-
 atdb/taskdatabase/tests/test_models_processed_summary.py | 1 +
 atdb/taskdatabase/views.py                               | 5 +++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py
index 290c5e8b..1ca1c9b8 100644
--- a/atdb/taskdatabase/models.py
+++ b/atdb/taskdatabase/models.py
@@ -240,7 +240,13 @@ class Task(models.Model):
 
             # if so, temporarily put it on hold so that the ancillary service can play with it
             if self.is_summary:
-                self.resume = False
+                # slightly bothered by the idea that ATDB puts it on HOLD and depends on the ancillary service
+                # to resume it. But users have earlier asked for the same dynamic for scrubbed. Acceptable
+
+                pass
+                # TODO: uncomment this, but I don't want to have it accidentally active without
+                # the summary service available and running to resume it.
+                #self.resume = False
 
         # nv:20feb2024, same as above, but for backward compatibilty reasons.
         # For tasks that are already beyond PROCESSED, but not yet ingested.
diff --git a/atdb/taskdatabase/tests/test_models_processed_summary.py b/atdb/taskdatabase/tests/test_models_processed_summary.py
index 4030f586..706e3acf 100644
--- a/atdb/taskdatabase/tests/test_models_processed_summary.py
+++ b/atdb/taskdatabase/tests/test_models_processed_summary.py
@@ -38,6 +38,7 @@ class TestProcessedSummary(TestCase):
         """
 
         actual = self.task2.resume
+        # this test fails, because "self.resume = False" is still commented out in models.py L249
         self.assertEqual(actual,  False)
 
     def test_activity_is_processed(self):
diff --git a/atdb/taskdatabase/views.py b/atdb/taskdatabase/views.py
index e3469e62..23aa284d 100644
--- a/atdb/taskdatabase/views.py
+++ b/atdb/taskdatabase/views.py
@@ -89,6 +89,7 @@ class TaskFilter(filters.FilterSet):
             'predecessor__status': ['exact', 'icontains', 'in', 'startswith'],
             'activity' : ['isnull'],
             'activity__id': ['exact'],
+            'activity__status': ['exact', 'icontains', 'in', 'startswith'],
             'activity__ingested_fraction' : ['exact','lt', 'lte', 'gt', 'gte','isnull'],
         }
 
@@ -130,6 +131,10 @@ class ActivityFilter(filters.FilterSet):
             'finished_fraction': ['exact', 'lt', 'lte', 'gt', 'gte'],
             'total_size': ['exact', 'lt', 'lte', 'gt', 'gte'],
             'remaining': ['exact', 'lt', 'lte', 'gt', 'gte'],
+            'is_processed': ['exact'],
+            'is_verified': ['exact'],
+            'is_validated': ['exact'],
+            'is_combined': ['exact'],
         }
 
 
-- 
GitLab