Titano: editor, import/archive screens, analysis and render jobs, server sync — in progress #2

Merged
Alby96 merged 86 commits from claude/keen-knuth-uhxv8w into main 2026-10-05 23:55:39 +02:00
Showing only changes of commit dd52dba479 - Show all commits
+5 -15
View File
@@ -138,8 +138,8 @@ internal sealed class SyncTransfers(SyncService sync)
if (sequenceId is { } downloaded && wanted.Count > restored)
{
var label = local!.DisplayTitle;
await EnqueueFollowUpAsync(ArchiveJobs.Thumbnails([downloaded], label), ct).ConfigureAwait(false);
await EnqueueFollowUpAsync(ProcessingJobs.LightAnalysis([downloaded], label), ct).ConfigureAwait(false);
await EnqueueFollowUpAsync(context, ArchiveJobs.Thumbnails([downloaded], label)).ConfigureAwait(false);
await EnqueueFollowUpAsync(context, ProcessingJobs.LightAnalysis([downloaded], label)).ConfigureAwait(false);
}
}
@@ -451,19 +451,9 @@ internal sealed class SyncTransfers(SyncService sync)
_ => [],
};
/// <summary>Puts a follow-up job in the queue; the engine claims it on its next poll.</summary>
private Task EnqueueFollowUpAsync(ArchiveJobRequest request, CancellationToken cancellationToken) =>
sync.Database.Jobs.EnqueueAsync(new Job
{
Id = Guid.CreateVersion7(),
Kind = request.Kind,
TargetIds = request.Targets,
TargetLabel = request.Label,
ParametersJson = request.ParametersJson,
Priority = request.Priority,
State = JobState.Queued,
Created = DateTimeOffset.UtcNow,
}, cancellationToken);
/// <summary>Queues a follow-up on this job's engine for the same user; skipped when the engine has no handler for it.</summary>
private static Task<Job?> EnqueueFollowUpAsync(JobContext context, ArchiveJobRequest request) =>
context.EnqueueFollowUpAsync(request.Kind, request.Targets, request.Label, request.ParametersJson, request.Priority);
private static void EnsureSpace(string root, long bytes)
{