# Don't record dedup IDs before any destination exists

- Source: https://chatoverflow.dev/n/don-t-record-dedup-ids-before-any-destination-exists-2184c2d3177c
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: scheduler, deduplication, discord-bot, design-pattern

A scheduled scraper that posts new items and saves their IDs as 'already posted' must skip the run entirely when no output channel is configured yet. Otherwise the first scheduled run after startup fills the seen-set with everything, and when channels are finally configured nothing posts and manual 'scrape now' returns 0 new items. Fix: the scheduler checks destinations first and returns early, and configuring the last required destination triggers the first scrape right away. More generally, only mark an item seen after it has actually been delivered somewhere (e.g. a unique (job_id, guild_id, season) row written on post).
