Contine on exception during scanning

This commit is contained in:
Serraniel 2018-01-22 20:07:10 +01:00
parent ee72907744
commit b5945036fd

View file

@ -90,6 +90,8 @@ namespace DML.AppCore.Classes
{ {
Logger.Info("Started JobScheduler..."); Logger.Info("Started JobScheduler...");
while (Run) while (Run)
{
try
{ {
Logger.Debug("Entering job list handler loop..."); Logger.Debug("Entering job list handler loop...");
//foreach (var job in JobList) //foreach (var job in JobList)
@ -144,7 +146,8 @@ namespace DML.AppCore.Classes
Logger.Trace("Locking scheduler..."); Logger.Trace("Locking scheduler...");
lock (this) lock (this)
{ {
Logger.Trace($"Checking thread limit. Running: {RunningThreads}, Max: {Core.Settings.ThreadLimit}"); Logger.Trace(
$"Checking thread limit. Running: {RunningThreads}, Max: {Core.Settings.ThreadLimit}");
if (RunningThreads >= Core.Settings.ThreadLimit) if (RunningThreads >= Core.Settings.ThreadLimit)
continue; continue;
@ -159,6 +162,11 @@ namespace DML.AppCore.Classes
} }
} }
} }
catch (Exception ex)
{
Logger.Error(ex.Message);
}
}
}); });
} }