E5: una partenza automatica non ferma la conversione per un file che manca
HasAutomaticCandidatesAsync guarda solo la base dati: un file registrato ma assente dal disco faceva prendere il cancello a ogni passata, e la conversione della libreria si fermava per niente, prima che il piano lo scartasse. Ora, dopo l'EXISTS, la partenza scorre i file dovuti fino al primo presente sul disco e solo allora prende il cancello. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c3d9e02e22
commit
0ff748db6f
2 files changed
+51
-5
No files matched your search
@@ -241,6 +241,14 @@ public sealed class ExportServiceAutomaticTests
|
||||
Assert.IsFalse(conversion.IsPreempted);
|
||||
Assert.IsTrue(bed.Gate.BackgroundRunning);
|
||||
|
||||
// A file the database has and the disk has not: the plan leaves it out, so it takes no lease either.
|
||||
var gone = await bed.PostAsync(bed.Luca, "m01", 2);
|
||||
File.Delete(bed.LibraryFile(bed.Luca, gone.Media[0]));
|
||||
Assert.AreEqual(AutoExportStartOutcome.NothingToDo, (await bed.Service.TryStartAutomaticAsync(Selection(auto, round: false), ct)).Outcome);
|
||||
Assert.AreEqual(AutoExportStartOutcome.NothingToDo, (await bed.Service.TryStartAutomaticAsync(Selection(auto, round: true), ct)).Outcome);
|
||||
Assert.IsFalse(conversion.IsPreempted);
|
||||
Assert.IsEmpty(await bed.Db.Exports.ListRunsAsync(ct));
|
||||
|
||||
await bed.PostAsync(bed.Luca, "n01", 1);
|
||||
Assert.AreEqual(AutoExportStartOutcome.Started, (await bed.Service.TryStartAutomaticAsync(Selection(auto, round: true), ct)).Outcome);
|
||||
Assert.IsTrue(conversion.IsPreempted);
|
||||
|
||||
Reference in new issue
Block a user