This commit is contained in:
2020-06-26 20:19:25 +00:00
parent 3a987f3477
commit 3189d54266
3 changed files with 34 additions and 68 deletions

View File

@@ -64,6 +64,9 @@ namespace AyaNova.Biz
await JobsBiz.LogJobAsync(job.GId, $"Starting...");
apiServerState.SetOpsOnly("Attachment file maintenance");
// EXISTENCE CHECK
//iterate all records in chunks
bool moreRecords = true;
@@ -93,9 +96,9 @@ namespace AyaNova.Biz
}
} while (moreRecords);
// long totalRecs = await ct.FileAttachment.LongCountAsync();
// long totalRecs = await ct.FileAttachment.LongCountAsync();
var allAttachments = FileUtil.GetAllAttachmentFilePaths();
// iterate FileAttachment records, if physically present then flag as such
// make sure it has a short circuit that if there are NO files physically then all are out of sync