feat(jobs): every job handler reports a structured progress detail
The job list showed a bar and a free-text line that each handler worded its own way. Each handler now reports its step, the item it is on, photo x of y and sequence/folder/output/step n of m through the P2.1 JobContext detail. Clients can word and lay that out themselves, and the 2/s throttle keeps the cost low: counts within a step go through ReportItemAsync, which allocates nothing. - scan: List, then Index (folder n of m, photo x of y as an adopted or reconciled folder is read) or Check, then FollowUps - verify, thumbs, proxies, deep analysis: photo x of y of sequence n of m; light analysis: sequence n of m; a thumbnail/proxy checkpoint carries the frame count it saves - convert: Verify (resume), Convert photo x of y, Replace; reorganize: step n of m with the title; import: the file being copied, photo x of y - maintenance: the step key, step n of 5, then Check; duplicates, orphans and backup run with no count; cleanup names step n of m; empty trash: entry n of m - render (local, workspace, render node): Analyse, Encode (frames of the last output, output n of m in a batch), Verify; sync, video copy, workspace copy/send/move: Upload/Download/CopyProxy/CopyOriginal/ CopyVideo/Reorganize with their items and counts The detail carries keys and names only, never localized text. The existing Message strings stay for clients that still show them. Refs #65 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ee9505df22
commit
45e6911082
31 files changed
+759
-119
No files matched your search
@@ -169,8 +169,16 @@ public sealed partial class SequenceTrash
|
||||
/// </summary>
|
||||
/// <param name="progress">Entries done so far (the resume point) and their number.</param>
|
||||
/// <exception cref="StaleTrashPlanException">The trash no longer holds exactly the planned entries; nothing was erased.</exception>
|
||||
internal Task<TrashEmptyResult> EmptyAsync(Archive archive, EmptyTrashParameters parameters, int start, Func<int, int, ValueTask> progress,
|
||||
CancellationToken cancellationToken) =>
|
||||
EmptyAsync(archive, parameters, start, progress, null, cancellationToken);
|
||||
|
||||
/// <inheritdoc cref="EmptyAsync(Archive, EmptyTrashParameters, int, Func{int, int, ValueTask}, CancellationToken)"/>
|
||||
/// <param name="erasing">
|
||||
/// Told before each entry with the entries done, their number and the entry's title (null when the trash no longer holds it).
|
||||
/// </param>
|
||||
internal async Task<TrashEmptyResult> EmptyAsync(Archive archive, EmptyTrashParameters parameters, int start, Func<int, int, ValueTask> progress,
|
||||
CancellationToken cancellationToken)
|
||||
Func<int, int, string?, ValueTask>? erasing, CancellationToken cancellationToken)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(archive);
|
||||
ArgumentNullException.ThrowIfNull(parameters);
|
||||
@@ -188,7 +196,9 @@ public sealed partial class SequenceTrash
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
var item = items[i];
|
||||
if (current.Entries.FirstOrDefault(e => e.Name == item.Name) is { } entry)
|
||||
var found = current.Entries.FirstOrDefault(e => e.Name == item.Name);
|
||||
if (erasing is not null) await erasing(i, items.Count, found?.Title).ConfigureAwait(false);
|
||||
if (found is { } entry)
|
||||
{
|
||||
if (EntryFingerprint(entry) != item.Fingerprint)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user