Scan Loop Last Write Time Change (#1492)

* Refactored invite user flow to separate error handling on create user flow and email flow. This should help users that have unique situations.

* Switch to using files to check LastWriteTime. Debug code in for Robbie to test on rclone

* Updated Parser namespace. Changed the LastWriteTime to check all files and folders.
This commit is contained in:
Joseph Milazzo 2022-08-30 10:29:09 -05:00 committed by GitHub
parent 521b2adc14
commit 85790dd71c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 283 additions and 264 deletions

View file

@ -26,7 +26,7 @@ public static class PersonHelper
foreach (var name in names)
{
var normalizedName = Parser.Parser.Normalize(name);
var normalizedName = Services.Tasks.Scanner.Parser.Parser.Normalize(name);
var person = allPeopleTypeRole.FirstOrDefault(p =>
p.NormalizedName.Equals(normalizedName));
if (person == null)
@ -49,7 +49,7 @@ public static class PersonHelper
/// <param name="action">Callback which will be executed for each person removed</param>
public static void RemovePeople(ICollection<Person> existingPeople, IEnumerable<string> people, PersonRole role, Action<Person> action = null)
{
var normalizedPeople = people.Select(Parser.Parser.Normalize).ToList();
var normalizedPeople = people.Select(Services.Tasks.Scanner.Parser.Parser.Normalize).ToList();
if (normalizedPeople.Count == 0)
{
var peopleToRemove = existingPeople.Where(p => p.Role == role).ToList();
@ -99,7 +99,7 @@ public static class PersonHelper
public static void AddPersonIfNotExists(ICollection<Person> metadataPeople, Person person)
{
var existingPerson = metadataPeople.SingleOrDefault(p =>
p.NormalizedName == Parser.Parser.Normalize(person.Name) && p.Role == person.Role);
p.NormalizedName == Services.Tasks.Scanner.Parser.Parser.Normalize(person.Name) && p.Role == person.Role);
if (existingPerson == null)
{
metadataPeople.Add(person);
@ -114,7 +114,7 @@ public static class PersonHelper
public static void AddPersonIfNotExists(BlockingCollection<Person> metadataPeople, Person person)
{
var existingPerson = metadataPeople.SingleOrDefault(p =>
p.NormalizedName == Parser.Parser.Normalize(person.Name) && p.Role == person.Role);
p.NormalizedName == Services.Tasks.Scanner.Parser.Parser.Normalize(person.Name) && p.Role == person.Role);
if (existingPerson == null)
{
metadataPeople.Add(person);