Skip to content

Commit

Permalink
Increase priority on rescanned packages
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <jyang@nexb.com>
  • Loading branch information
JonoYang committed Aug 4, 2023
1 parent 5258a92 commit eb6f250
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions minecode/management/commands/process_scans.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions minecode/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down

0 comments on commit eb6f250

Please sign in to comment.