Skip to content

Commit

Permalink
Hotfix scans when running HASH_SCAN
Browse files Browse the repository at this point in the history
  • Loading branch information
gantoine committed Aug 12, 2024
1 parent 336cc42 commit e24a3b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/alembic/versions/0025_roms_hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def upgrade() -> None:
sa.Column("sha1_hash", sa.String(length=100), nullable=True)
)

# Run a no-scan in the background on startup
# Run a no-scan in the background on migrate
if not IS_PYTEST_RUN:
high_prio_queue.enqueue(
scan_platforms, [], ScanType.HASH_SCAN, [], [], job_timeout=SCAN_TIMEOUT
Expand Down
4 changes: 4 additions & 0 deletions backend/endpoints/sockets/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ async def _identify_rom(

_added_rom = db_rom_handler.add_rom(scanned_rom)

# Return early if we're only scanning for hashes
if scan_type == ScanType.HASH_SCAN:
return scan_stats

path_cover_s, path_cover_l = await fs_resource_handler.get_cover(
overwrite=True,
entity=_added_rom,
Expand Down

0 comments on commit e24a3b8

Please sign in to comment.