feat(releases): save early to improve skip duplicates matching#1909
feat(releases): save early to improve skip duplicates matching#1909
Conversation
| From("release r"). | ||
| LeftJoin("release_action_status ras ON r.id = ras.release_id"). | ||
| Where("ras.status = 'PUSH_APPROVED'") | ||
| Where(sq.Or{sq.Eq{"r.filter_status": domain.ReleaseStatusFilterApproved}, sq.Eq{"r.filter_status": domain.ReleaseStatusFilterPending}}) |
There was a problem hiding this comment.
We currently have that bug where pending can last forever without a valid push. It's gotten better with those http timeouts, but a script that never exits will hit the same issue I think? On paper this might be closer to the right mechanism, but I think you want to clear pending on startup with an internal state failure logged.
|
This PR will help. Is the only thing missing the startup check that @KyleSanderson suggests? I dug deep into why my filter did not skip dups or download only 1 episode per day, and it was due to the delay caused by setting status=Approved only after ReannounceTorrentWithRetry returns. |
|
Coming back to this after some time and thinking: We could add a new option to client actions with something like "Wait for re-announce" and make it opt-in, or opt-out, and let re-announce run in the background without blocking/waiting. That should improve things when it doesn't have to wait. And the goal is still to find a better solution for in-flight items but that will take a lot longer still. |
This is an experimental pr to improve the matching for skip duplicates with releases that are announced within seconds of each other.