The collector used INSERT IGNORE which silently skipped duplicate items without updating their collected_at timestamp. After 24 hours, these items fell out of the analyzer's window permanently — even though they kept appearing in the RSS feed. This caused "No new source data to analyze" on every run once the initial batch aged out. Switch to INSERT ... ON DUPLICATE KEY UPDATE to refresh collected_at (plus score and comment_count, which change over time on Reddit). The analyzer's 24-hour window now sees re-fetched items again. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7.0 KiB
Executable File
7.0 KiB
Executable File