Adding some noise

Adding some noise to ensure that syncing is progressing as it should.
This commit is contained in:
Mario Steele 2025-07-30 12:30:14 -05:00
parent 58e046c1f0
commit f9af985de4
2 changed files with 7 additions and 0 deletions

View file

@ -68,9 +68,13 @@ class Program
Thread.Sleep(100);
if (lastTime - DateTime.Now > TimeSpan.FromSeconds(30))
{
var start = DateTime.Now;
Console.WriteLine("Checking for updates...");
foreach (var syncer in syncers)
syncer.FetchDatabase().Wait();
lastTime = DateTime.Now;
var end = DateTime.Now - start;
Console.WriteLine($"Check completed. Total Time: {end}");
}
if (Process.GetProcessesByName("FreeTube").Length > 0) continue;
Console.WriteLine("FreeTube has closed and we have updates, we're going to try and update.");

View file

@ -83,8 +83,11 @@ public class Syncer<T> : ISyncer where T : class, IDataModel, new()
if (data.Equals(entry)) continue;
Console.WriteLine($"Updated Entry for {_dbName}");
_entries.RemoveAll(x => x.EqualId(entry.Id()));
}
else
Console.WriteLine($"New Entry for {_dbName}");
_entries.Add(entry);
_isDirty = true;
}