Skip to content

Commit 670b8e3

Browse files
committed
Update MigrateOldArtifacts
1 parent b9ac475 commit 670b8e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

BlazorDiffusion.ServiceInterface/MigrationServices.cs

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public async Task<object> Any(MigrateOldArtifacts request)
5252
if (string.IsNullOrEmpty(newFilePath))
5353
{
5454
to.Failed.Add(filePath);
55+
log.LogError("Failed migrating artifact {Id} {FilePath}: Missing Path",
56+
artifact.Id, filePath);
5557
}
5658
else
5759
{
@@ -67,12 +69,16 @@ public async Task<object> Any(MigrateOldArtifacts request)
6769
FilePathMedium = filePathMedium,
6870
FilePathLarge = newFilePath,
6971
}, where: a => a.Id == artifact.Id);
72+
to.Results.Add(newFilePath);
73+
log.LogInformation($"Migrated {artifact.Id} to {newFilePath}");
7074
}
7175
}
7276
}
7377
else
7478
{
7579
to.Failed.Add(artifact.FilePath);
80+
log.LogError("Failed migrating artifact {Id} {FilePath}: {Json}",
81+
artifact.Id, filePath, api.Error.ToJson());
7682
}
7783
}
7884
catch (Exception e)

0 commit comments

Comments
 (0)