mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added exception logging to Tasks.
This commit is contained in:
parent
508b087c46
commit
d607b831c9
7 changed files with 39 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue