mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-07-21 06:14:12 +00:00
Problem: - Download counts were not incrementing when packages existed in storage but not in the database (e.g., after database migration/reset) - UpdateDownloadCount() was failing silently when package didn't exist in DB - Error was completely ignored despite comment claiming "error logged" Changes: 1. Log errors when UpdateDownloadCount() fails instead of silently ignoring 2. Auto-save package to database if UpdateDownloadCount() fails 3. Retry download count update after saving package 4. Provide detailed error logging for troubleshooting This fixes the issue where: - Database is migrated but storage still has cached packages - Cache hits occur but download events aren't recorded - Statistics show zero downloads despite actual usage Resolves user report: "I cleaned go mod which redownloaded the modules through the proxy but counters did not increased"