sync: adopt prints per-group so multiple people get notified#5
Merged
Conversation
!sync skipped any queue item already tracked by *any* group, so if one person was already watching a print, anyone else running !sync would not adopt it and got no start/finish notifications. Scope the already-tracked check to the syncing group: items another group tracks are now adopted too, so everyone who runs !sync hears about a print's start and end (even if that means more than one person is notified about the same print). Stays idempotent within a single group. Each tracker already notifies its own group_id in _check_completions, so multiple trackers per queue item fan out correctly.
Adds an explicit opt-in subscription command instead of overloading !sync: !abo all subscribe to every open print in the queue !abo 2 3 subscribe to specific prints by their !liste position !abo show usage + which prints you're currently subscribed to !abo stop [n] / !deabo unsubscribe (all, or specific positions) Each subscription is a per-group completion tracker, so several people can subscribe to the same print and all get its start/finish notifications — more than one person can be notified about one print. Subscribing is idempotent per group; unsubscribing only mutes that group, the print keeps running. !sync keeps its original global behavior (adopt untracked external prints once). Refactors the queue-item name lookup and tracker creation into shared _item_name/_open_queue/_adopt_item helpers used by !liste, !sync and !abo. Adds de/en strings, help-text entries and tests.
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.
!sync skipped any queue item already tracked by any group, so if one
person was already watching a print, anyone else running !sync would not
adopt it and got no start/finish notifications.
Scope the already-tracked check to the syncing group: items another
group tracks are now adopted too, so everyone who runs !sync hears about
a print's start and end (even if that means more than one person is
notified about the same print). Stays idempotent within a single group.
Each tracker already notifies its own group_id in _check_completions, so
multiple trackers per queue item fan out correctly.