Repository navigation
Don't count recent MAM snatches twice when finding free slots; source links on Queued - #60
Merged
Merged
Conversation
Items on the Queued page get the same "Open on MyAnonamouse" button as History, opening the release's page at its source (the MAM torrent listing) in a new tab: - Downloads up next have it beside Remove. - Saved picks waiting for room have one beside each release line, since a book can have several releases picked. The Wanted page gets them too, for books whose releases are already picked. The button is now a shared SourcePageLink, used by History as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY
MAM's unsatisfied count lags its snatches, so Shelfmark adds the torrents it handed off in the last 15 minutes to it. Once MAM's count had caught up, they were counted twice. A run that filled the free slots then saw the account as full for the rest of those 15 minutes: at 132 of 150 with 5 kept free, it worked out 150 - 5 - 132 - 13 = 0, and the downloads up next waited although 13 slots were free. They were only re-checked every 5 minutes, so the queue moved in bursts with long stalls. Shelfmark now keeps the readings of MAM's unsatisfied count it takes. However far the count has risen since the reading just before the recent snatches, that many of them are already in it, and only the rest are added. With no earlier reading (after a restart), all of them still count. Torrents leaving the count meanwhile only make it count more, and the kept-free slots cover snatches made outside Shelfmark. Downloads waiting for a slot are re-checked every 2 minutes instead of 5, and their status says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Downloads waiting for an unsatisfied slot when slots were free
Source links on the Queued page
SourcePageLink, used by History too.Testing
-m "not integration and not e2e"): only the same 5 environment failures as before.🤖 Generated with Claude Code
https://claude.ai/code/session_01V88DbAixT45r3AJsyFJchY
Generated by Claude Code