Repository navigation
Scope Audible job cleanup to the deleted person and guard disc backups - #563
Merged
Merged
Conversation
Deleting a person or household member now cancels only their Audible polls, syncs and backups (account ids read before the cascade), and the Audible scheduler cancels jobs left by an interrupted deletion at start and on its tick. Setting a folder to one book checks saved Audible title destinations, account templates and open backups' placement in the same transaction, so a disc backup can no longer claim an unrelated book; the refusal names its reason (indexed_book, book_override) in the console. Job history pruning moves onto the job kinds' registration, run inside the enqueue transaction.
The orphan sweep on the one-minute tick and the folder-override check walked every open job; both now seek the audible key range of idx_bridge_jobs_open. A remap checks its saved destinations in one statement, the disc refusal wording lives in one helper, and the import key's account part is built in one place. Part of #294.
The disc-folder check took a template's folders from the raw string, so
"Audible/CD 1/" named the disc folder itself as the parent: re-saving the
template or re-mapping the account was refused once that lone disc was
indexed, while a one-book override on the real parent went through. The
folders are now split, trimmed and sanitized as the Bridge's placement
renders them, and a file token with modifiers ({OriginalFilename:lower},
{Ext:upper}) names the file as it does there. The remap check also loses a
branch no caller reaches.
Part of #294.
The account PATCH and the Bridge's account PUT can now answer 400 invalid_dest_path; their docs, the console client's and the catalog's say so. A failed cancel of a deleted person's jobs names the accounts again. Part of #294.
The two new refusals said "Escolhe" where the rest of the locale says "Escolha". Part of #294.
EnqueueAll skips Enqueue's pruning, promotion, cancels and refusals; now that pruning is a field on the kind, a batch kind gaining one would be silently skipped. Part of #294.
A title already on this server is never backed up again, yet its saved disc destination was checked against the library the Bridge maps the account to. A book override or an indexed book at that old disc parent in the new library refused the Bridge's PUT with invalid_dest_path, so the Bridge could not move the account. Only titles that can still be backed up (unmatched, or marked Not this book) are checked now. Part of #294.
checkDestOwnFolder and the audible_disc_parent registration had no doc comment; every other SQL function registration names its arguments and purpose. Part of #294.
KodeStar
added a commit
to KodeStar/audiosilo-docs
that referenced
this pull request
Nov 22, 2026
…348) Docs for KodeStar/audiosilo-server#563. - Admin Audible page: both destination refusals (the folder is already a book; the folder is set to "Always one book"), the hold while a backup is waiting, running or needs attention, and how to resolve each. The Libraries and Users pages link to these and say what deleting a person cancels. - API reference: the `reason` (`indexed_book`, `book_override`) on `400 invalid_dest_path` for the folder override, title destination, account and Bridge account routes, in one "Audible disc destinations" section. - Bridge developer pages: the server's orphan sweep and per-kind job history ("Job history"); the Bridge itself is unchanged. /admin and /bridge routes are not in the API changelog. No screenshots.
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.
Follow-ups from server#294 (SRV-7 comment, items c1 to c4) and the BR-MIGRATIONS verify finding F1.
cancel_requested. Other people's jobs are untouched.400 invalid_dest_pathis kept, with an additivereasonofindexed_bookorbook_override. The console translates both in six languages. The Bridge'sPUT /bridge/audible/accounts/{account}can now answer this 400; the Bridge decodes it leniently.No migration.
Verified live on a scratch server with a stand-in Bridge over HTTP: both refusal reasons on destinations, templates and folder overrides (console wording in en, de and pt), the open-backup hold until cancelled, re-map refusal and re-map past a matched title, scoped cancellation on person and member delete, the orphan sweep with the Bridge offline and an idle sweep with no writes, and per-account pruning over four cycles. The podcast half of pruning is covered by unit tests only.
Bridge follow-up (separate issue):
joinedBooksmisses a lone indexed sibling disc, so the Bridge can write a title's ASIN onto the merged book. This server change now refuses that match.Source: v2.7.0 burn-down SRV-AUDIBLE-JOBS. Docs: audiosilo-docs PR to follow.