added debug info.
This commit is contained in:
parent
188d8f48e3
commit
01af7a3e36
@ -179,4 +179,21 @@ public class StateMachine
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public long CountTriplets()
|
||||
{
|
||||
lock(Mutex)
|
||||
{
|
||||
if (!Populated)
|
||||
PopulateWithHistory().Wait();
|
||||
|
||||
long c = 0;
|
||||
foreach (var kv in Implementation)
|
||||
foreach (var i in kv.Key)
|
||||
c++;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ Console.WriteLine("Connected to Mongo database.");
|
||||
CoreInstance.Persistence = dbInterface;
|
||||
CoreInstance.State.History = dbInterface;
|
||||
await CoreInstance.State.PopulateWithHistory();
|
||||
Console.WriteLine($"Populated with {CoreInstance.State.CountTriplets()} triplets");
|
||||
builder.Services.AddSingleton(dbInterface);
|
||||
builder.Services.AddSingleton(new CurrentSoftwareRefresher(CoreInstance));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user