Skip to content
Snippets Groups Projects
Commit 4aedc2e9 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

only update_activity on statusses that actually do updates (to speed it up)

parent ac2b5cd0
No related branches found
No related tags found
1 merge request!341SDC-1188 - final merge
Pipeline #72498 passed
......@@ -31,7 +31,7 @@
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
<p class="footer"> Version 16 Feb 2024 (11:00)
<p class="footer"> Version 16 Feb 2024 (13:30)
</div>
{% include 'taskdatabase/refresh.html' %}
......
......@@ -1730,6 +1730,7 @@ def UpdateAllActivities(request):
return redirect('index')
def UpdateActivitySasId(request, sas_id):
# this function is called externally to avoid worker timeouts
# http://localhost:8000/atdb/tasks/repair/update-activity/600907
......@@ -1743,7 +1744,7 @@ def UpdateActivitySasId(request, sas_id):
for task in tasks:
i += 1
if task.status not in ['discarded', 'suspended']:
if task.status in ['stored', 'validated','scrubbed','archiving', 'archived','finished'] or 'failed' in task.status:
activities_handler.update_activity(task)
logger.info(f'{i} of {total} for sas_id = {sas_id}')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment