diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index e8a681ef6f43e45ee4cfea057fa78354924250cd..7624c0d375b2ad438df63e44bc35713f202ef7c1 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -233,19 +233,20 @@ class Task(models.Model): # when a task goes to PROCESSED... if (self.status != State.PROCESSED.value) & (self.new_status == State.PROCESSED.value): - # only when the tasks are not yet aggregated - if self.activity.status != State.AGGREGATED.value: + # ...but only when the tasks of this activity are not yet aggregated + # (because the aggregator service also sets tasks back to processed) + + if (self.activity.status != State.AGGREGATED.value): # check if this task is a summary task self.is_summary = check_if_summary(self) - # if so, temporarily put it on hold so that the ancillary service can play with it + # if so, temporarily put it on hold so that the ancillary service can grab it with it if self.is_summary: # 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 - - # TODO: uncomment this, but I don't want to have it accidentally active without - # the summary service available and running to resume it. + # TODO: (un)comment this + # We don't want ATDB holding tasks without a aggregator service in place to resume self.resume = False # TODO: Q: should ATDB do this? or the aggregator service? diff --git a/atdb/taskdatabase/views.py b/atdb/taskdatabase/views.py index b80e2361a8a7c0ead2aea3751b56a1472d180e86..0733a6e39fe64f118f28c932937fb0f3e0964cd9 100644 --- a/atdb/taskdatabase/views.py +++ b/atdb/taskdatabase/views.py @@ -155,6 +155,7 @@ class LogEntryFilter(filters.FilterSet): fields = { 'task__id': ['exact'], + 'service': ['exact', 'icontains', 'in'], 'step_name': ['exact', 'icontains', 'in', 'startswith'], 'status': ['exact', 'in'], }