This commit is contained in:
2020-06-26 18:34:17 +00:00
parent 3d4433d578
commit e7c677365a

View File

@@ -76,6 +76,19 @@ namespace AyaNova.Biz
// var seed = new Util.Seeder();
// await seed.SeedDatabaseAsync(seedLevel, job.GId, timeZoneOffset);
// EXISTENCE CHECK
// 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
// this scenario is someone moving a db and not moving physical files
// ORPHANED FILES CHECK
// These should never be out of sync due to timing issues, the file would be deleted before teh db record
// iterate physical files, if not in db then make a FileAttachment record for it AyaType nothing id 0
// if user want's to move them, they can download and then attach and then remove the generated attachment (Nothing id 0) the holder of orphaned files
// (Or move feature)
// DE-ORPHANIZE ACTION
// iterate orphaned file attachments to NOTHING type, if found to be attached to any other object remove the orphaned object attachement
await JobsBiz.LogJobAsync(job.GId, "Finished.");
await JobsBiz.UpdateJobStatusAsync(job.GId, JobStatus.Completed);