More cleanup

This commit is contained in:
Bond_009
2021-12-15 18:25:36 +01:00
committed by Cody Robibero (Rebase PR Action)
parent 4441513ca4
commit ea8f40e84a
46 changed files with 135 additions and 203 deletions

View File

@@ -3,7 +3,7 @@ using System.Threading;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.ScheduledTasks
namespace Emby.Server.Implementations.ScheduledTasks.Triggers
{
/// <summary>
/// Represents a task trigger that fires everyday.
@@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
/// <param name="logger">The logger.</param>
/// <param name="taskName">The name of the task.</param>
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
public void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup)
public void Start(TaskResult? lastResult, ILogger logger, string taskName, bool isApplicationStartup)
{
DisposeTimer();
@@ -54,7 +54,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
logger.LogInformation("Daily trigger for {Task} set to fire at {TriggerDate:yyyy-MM-dd HH:mm:ss.fff zzz}, which is {DueTime:c} from now.", taskName, triggerDate, dueTime);
_timer = new Timer(state => OnTriggered(), null, dueTime, TimeSpan.FromMilliseconds(-1));
_timer = new Timer(_ => OnTriggered(), null, dueTime, TimeSpan.FromMilliseconds(-1));
}
/// <summary>