From 7a0f66d74b58f94db9f4a0ef7582bf9daf1cfb20 Mon Sep 17 00:00:00 2001 From: Vermaas <vermaas@astron.nl> Date: Fri, 3 Mar 2023 13:56:48 +0100 Subject: [PATCH] task goes 'on hold' when status goes to 'scrubbed' show scrubbing/scrubbed in Dashboard overview --- atdb/atdb/settings/base.py | 4 ++-- atdb/taskdatabase/models.py | 2 +- atdb/taskdatabase/templates/taskdatabase/index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atdb/atdb/settings/base.py b/atdb/atdb/settings/base.py index 7f188210..44ee30e9 100644 --- a/atdb/atdb/settings/base.py +++ b/atdb/atdb/settings/base.py @@ -205,8 +205,8 @@ LOGOUT_REDIRECT_URL = FORCE_SCRIPT_NAME + 'atdb' STATIC_URL = FORCE_SCRIPT_NAME + 'atdb/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') -ALL_STATUSSES = ['defining','defined','staging','staged','processing','processed','storing','stored','validated', 'archiving','archived','finished'] -ACTIVE_STATUSSES = ['staging','staged','processing','processed','validated','storing','stored','archiving','archived'] +ALL_STATUSSES = ['defining','defined','staging','staged','processing','processed','storing','stored','scrubbing','scrubbed','validated', 'archiving','archived','finished'] +ACTIVE_STATUSSES = ['staging','staged','processing','processed','validated','storing','stored','scrubbing','scrubbed','archiving','archived'] STATUSSES_WITH_DATA = ['staged','fetching','fetched','processing','processed','validated','storing','stored','scrubbing','scrubbed','archiving','archived'] AGGREGATES = ['failed','active','total'] diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index f1b3bd95..59bb7dc1 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -109,7 +109,7 @@ class Task(models.Model): # nv:1mar2023, temporary hack, set tasks 'on hold' as soon they get to 'stored' # (users forget to do that manually, causing unwanted ingests) - if (self.status != 'stored') & (self.new_status == 'stored'): + if (self.status != 'scrubbed') & (self.new_status == 'scrubbed'): self.resume = False super(Task, self).save(*args, **kwargs) diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index 28aae03a..baecfcb3 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -34,7 +34,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 1 March 2023 + <p class="footer"> Version 3 March 2023 </div> -- GitLab