Little fixes and debug database
This commit is contained in:
parent
a867b35cad
commit
d7bbbeade9
|
@ -92,8 +92,13 @@ namespace DML.Application.Classes
|
|||
}
|
||||
|
||||
Logger.Debug("Loading database...");
|
||||
#if DEBUG
|
||||
Database = new LiteDatabase(Path.Combine(DataDirectory, "config.debug.db"));
|
||||
Database.Log.Logging += (message) => Logger.Trace($"LiteDB: {message}");
|
||||
#else
|
||||
Database = new LiteDatabase(Path.Combine(DataDirectory, "config.db"));
|
||||
Database.Log.Logging += (message) => Logger.Trace($"LiteDB: {message}");
|
||||
#endif
|
||||
|
||||
Logger.Debug("Loading settings collection out of database...");
|
||||
var settingsDB = Database.GetCollection<Settings>("settings");
|
||||
|
@ -221,7 +226,11 @@ namespace DML.Application.Classes
|
|||
}
|
||||
|
||||
if (Settings.RescanRequired)
|
||||
{
|
||||
Logger.Info("Restting timestamps");
|
||||
job.KnownTimestamp = 0;
|
||||
job.Store();
|
||||
}
|
||||
}
|
||||
|
||||
Settings.RescanRequired = false;
|
||||
|
|
|
@ -167,6 +167,8 @@ namespace DML.AppCore.Classes
|
|||
{
|
||||
Trace("Updating StopTimestamp for next scan...");
|
||||
StopTimestamp = SweetUtils.DateTimeToUnixTimeStamp(result[result.Count - 1].CreatedAt.UtcDateTime);
|
||||
KnownTimestamp = StopTimestamp;
|
||||
Store();
|
||||
}
|
||||
|
||||
Debug($"Fisnished scan of guild {GuildId} channel {ChannelId}.");
|
||||
|
|
Loading…
Reference in a new issue