mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 13:01:28 +02:00
added exception logging to Tasks.
This commit is contained in:
@@ -6,6 +6,7 @@ using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using Timer = System.Timers.Timer;
|
||||
using NzbDrone.Common.TPL;
|
||||
|
||||
namespace NzbDrone.Core.Jobs
|
||||
{
|
||||
@@ -30,7 +31,9 @@ namespace NzbDrone.Core.Jobs
|
||||
{
|
||||
_cancellationTokenSource = new CancellationTokenSource();
|
||||
Timer.Interval = 1000 * 30;
|
||||
Timer.Elapsed += (o, args) => Task.Factory.StartNew(ExecuteCommands, _cancellationTokenSource.Token);
|
||||
Timer.Elapsed += (o, args) => Task.Factory.StartNew(ExecuteCommands, _cancellationTokenSource.Token)
|
||||
.LogExceptions();
|
||||
|
||||
Timer.Start();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user