#27 Changed properties in the jobs and fixed old rescan code. Also set rescan to false (we may ask the user later).
This commit is contained in:
parent
2f68a3d7a9
commit
dfcc430ab1
|
@ -39,8 +39,7 @@ namespace DML.AppCore.Classes
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public ulong GuildId { get; set; }
|
public ulong GuildId { get; set; }
|
||||||
public ulong ChannelId { get; set; }
|
public ulong ChannelId { get; set; }
|
||||||
public double KnownTimestamp { get; set; } = 0;
|
public ulong LastMessageId { get; set; }
|
||||||
private double StopTimestamp { get; set; } = 0;
|
|
||||||
private bool IsValid { get; set; } = true;
|
private bool IsValid { get; set; } = true;
|
||||||
internal JobState State { get; set; } = JobState.Idle;
|
internal JobState State { get; set; } = JobState.Idle;
|
||||||
|
|
||||||
|
@ -91,6 +90,7 @@ namespace DML.AppCore.Classes
|
||||||
/// <returns>Returns true if the newest messages have been scanned.</returns>
|
/// <returns>Returns true if the newest messages have been scanned.</returns>
|
||||||
internal async Task<bool> Scan()
|
internal async Task<bool> Scan()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Debug($"Starting scan of guild {GuildId} channel {ChannelId}...");
|
Debug($"Starting scan of guild {GuildId} channel {ChannelId}...");
|
||||||
var result = new List<IMessage>();
|
var result = new List<IMessage>();
|
||||||
|
|
||||||
|
@ -220,6 +220,8 @@ namespace DML.AppCore.Classes
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug($"Fisnished scan of guild {GuildId} channel {ChannelId}.");
|
Debug($"Fisnished scan of guild {GuildId} channel {ChannelId}.");
|
||||||
|
*/
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Stop()
|
public void Stop()
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace DML.Application.Classes
|
||||||
public bool SkipExistingFiles { get; set; } = true;
|
public bool SkipExistingFiles { get; set; } = true;
|
||||||
public int ThreadLimit { get; set; } = 50;
|
public int ThreadLimit { get; set; } = 50;
|
||||||
public bool ShowStartUpHints { get; set; } = true;
|
public bool ShowStartUpHints { get; set; } = true;
|
||||||
public bool RescanRequired { get; set; } = true;
|
public bool RescanRequired { get; set; } = false;
|
||||||
public bool UseRPC { get; set; } = false;
|
public bool UseRPC { get; set; } = false;
|
||||||
|
|
||||||
public void Store()
|
public void Store()
|
||||||
|
|
|
@ -275,7 +275,7 @@ namespace DML.Application.Core
|
||||||
if (Settings.RescanRequired)
|
if (Settings.RescanRequired)
|
||||||
{
|
{
|
||||||
Logger.Info("Restting timestamps");
|
Logger.Info("Restting timestamps");
|
||||||
job.KnownTimestamp = 0;
|
job.LastMessageId = 0;
|
||||||
job.Store();
|
job.Store();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue