Rebuilt and moved CopyManualFiles closer

This commit is contained in:
2023-08-07 22:50:03 -07:00
parent 5582504c4b
commit 8b4d5248cb
4 changed files with 78 additions and 43 deletions

View File

@ -54,12 +54,24 @@ public class MapLogic : Shared.Models.Methods.IMapLogic
}
else
{
ReadOnlyCollection<string> readOnlyPersonKeyFormattedCollection;
ReadOnlyDictionary<string, string> readOnlyPersonKeyFormattedToNewestPersonKeyFormatted;
ReadOnlyDictionary<string, PersonContainer> readOnlyPersonKeyFormattedToPersonContainer;
ReadOnlyDictionary<long, List<PersonContainer>> readOnlyPersonKeyToPersonContainerCollection;
int copied = Stateless.MapLogic.CopyManualFiles(configuration, ticks, personContainers, eDistanceContentTicksDirectory);
if (copied > 0)
throw new Exception("Confirm Manual files and then restart!");
Stateless.MapLogic.SetSkipCollections(configuration, personContainers, a2PeopleSingletonDirectory, skipCollection, skipNotSkipCollection);
List<Stateless.MapLogic.Record> records = Stateless.MapLogic.SetPersonCollectionsAndGetRecords(configuration, ticks, personContainers, eDistanceContentDirectory);
{
List<string> personKeyFormattedCollection = new();
Dictionary<string, string> personKeyFormattedToNewestPersonKeyFormatted = new();
Stateless.MapLogic.SetPersonCollections(configuration, personContainers, personKeyFormattedToNewestPersonKeyFormatted, personKeyFormattedCollection);
readOnlyPersonKeyFormattedCollection = new(personKeyFormattedCollection);
readOnlyPersonKeyFormattedToNewestPersonKeyFormatted = new(personKeyFormattedToNewestPersonKeyFormatted);
}
List<Stateless.MapLogic.Record> records = Stateless.MapLogic.DeleteEmptyDirectoriesAndGetCollection(configuration, ticks, eDistanceContentDirectory, readOnlyPersonKeyFormattedToNewestPersonKeyFormatted, readOnlyPersonKeyFormattedCollection);
ReadOnlyCollection<(Stateless.MapLogic.PersonKeyFormattedIdThenWholePercentages, PersonContainer)> readOnlyPossiblyNewPersonDisplayDirectoryNamesAndPersonContainer;
locationContainers.AddRange(Stateless.MapLogic.GetLocationContainers(distance, maxDegreeOfParallelism, configuration, ticks, personContainers, eDistanceContentDirectory, eDistanceContentTicksDirectory, skipCollection, records));
locationContainers.AddRange(Stateless.MapLogic.GetLocationContainers(distance, maxDegreeOfParallelism, configuration, ticks, personContainers, eDistanceContentDirectory, skipCollection, records));
int lossCount = records.Count - locationContainers.Count;
ReadOnlyCollection<Stateless.MapLogic.PersonKeyFormattedIdThenWholePercentages> personKeyFormattedIdThenWholePercentagesCollection = Stateless.MapLogic.GetPersonKeyFormattedIdThenWholePercentages(configuration, ticks, records);
int unableToMatchCount = records.Count - personKeyFormattedIdThenWholePercentagesCollection.Count;