From eb6f250b31fa8aa65ec7e8b58dd5247009bf381c Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Fri, 4 Aug 2023 12:17:52 -0700 Subject: [PATCH] Increase priority on rescanned packages Signed-off-by: Jono Yang --- minecode/management/commands/process_scans.py | 1 + minecode/models.py | 1 + 2 files changed, 2 insertions(+) diff --git a/minecode/management/commands/process_scans.py b/minecode/management/commands/process_scans.py index 11d07168..8023dc63 100644 --- a/minecode/management/commands/process_scans.py +++ b/minecode/management/commands/process_scans.py @@ -145,6 +145,7 @@ def process_scan(cls, scannable_uri, get_scan_info_save_loc='', get_scan_data_sa scannable_uri.scan_status = ScannableURI.SCAN_INDEXED if rescan: scannable_uri.rescan = False + scannable_uri.priority = 0 except Exception as e: error_message = str(e) + '\n' diff --git a/minecode/models.py b/minecode/models.py index 7e7dfce6..16c44854 100644 --- a/minecode/models.py +++ b/minecode/models.py @@ -773,6 +773,7 @@ def rescan(self): self.index_error = None self.scan_uuid = None self.scan_request_date = None + self.priority = 100 self.save()