diff --git a/tasks/tests/unit/test_upload_task.py b/tasks/tests/unit/test_upload_task.py index 307e9b732..d6851d3cd 100644 --- a/tasks/tests/unit/test_upload_task.py +++ b/tasks/tests/unit/test_upload_task.py @@ -167,7 +167,6 @@ def test_upload_task_call( assert commit.parent_commit_id is None assert commit.report is not None assert commit.report.details is not None - assert commit.repository.updatestamp > repo_updatestamp sessions = commit.report.uploads assert len(sessions) == 1 first_session = ( diff --git a/tasks/upload.py b/tasks/upload.py index 1011641ea..66d506ce4 100644 --- a/tasks/upload.py +++ b/tasks/upload.py @@ -3,7 +3,6 @@ import time import uuid from copy import deepcopy -from datetime import datetime from typing import Any, Dict, List, Optional import orjson @@ -416,7 +415,6 @@ def run_impl_within_lock( ) assert commit, "Commit not found in database." repository = commit.repository - repository.updatestamp = datetime.now() repository_service = None was_updated, was_setup = False, False diff --git a/tasks/upload_finisher.py b/tasks/upload_finisher.py index 37e75ffc1..252570f26 100644 --- a/tasks/upload_finisher.py +++ b/tasks/upload_finisher.py @@ -1,6 +1,7 @@ import logging import random import re +from datetime import datetime from enum import Enum import sentry_sdk @@ -163,6 +164,10 @@ def run_impl( cleanup_intermediate_reports(archive_service, commit.commitid, upload_ids) + # Mark the repository as updated so it will appear earlier in the list + # of recently-active repositories + repository.updatestamp = datetime.now() + if not should_trigger_postprocessing(state.get_upload_numbers()): return