Commit 882076d
fix(extractor): cache file list to avoid double scraping Discogs website
When FORCE_REPROCESS is set, list_s3_files was called twice per run:
once in process_discogs_data to detect the version, and again inside
download_discogs_data. This caused two full scrapes of the Discogs
website on every startup.
Added cached_files field to Downloader so the result of the first
scrape is reused within the same process_discogs_data invocation.
The cache is naturally reset on each run since a new Downloader is
created per invocation, ensuring periodic checks always fetch fresh
data from the website.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 76242a7 commit 882076d
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
213 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
| 230 | + | |
224 | 231 | | |
225 | 232 | | |
226 | 233 | | |
| |||
0 commit comments