Handle stale syncs #2257
Reference in New Issue
Block a user
Delete Branch "zachgoll/handle-stale-syncs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When code changes are deployed and workers restart, in-process syncs will be aborted and will never be re-run. This causes many syncs to become stuck in
pendingorsyncingstatus forever.This PR mitigates the effects of this with a 3-pronged approach:
visiblescope makes it so users won't ever see a sync longer than 5 minutes (and most syncs will complete even faster)sync_latermethod now marks all prior syncs for that specificsyncablerecord asstaleprior to starting a new syncSyncCleanerJobruns hourly and marks any syncs that became stale asstale