mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
moved hosting, system tray out of common
This commit is contained in:
parent
2ec79e6744
commit
45b4972091
17 changed files with 115 additions and 93 deletions
|
@ -1,39 +0,0 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Jobs;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
|
||||
namespace NzbDrone.Core.Lifecycle
|
||||
{
|
||||
public class AppRestartJob : IJob
|
||||
{
|
||||
private readonly IHostController _hostController;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public AppRestartJob(IHostController hostController)
|
||||
{
|
||||
_hostController = hostController;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "Restart NzbDrone"; }
|
||||
}
|
||||
|
||||
public TimeSpan DefaultInterval
|
||||
{
|
||||
get { return TimeSpan.FromTicks(0); }
|
||||
}
|
||||
|
||||
public virtual void Start(ProgressNotification notification, dynamic options)
|
||||
{
|
||||
notification.CurrentMessage = "Restarting NzbDrone";
|
||||
logger.Info("Restarting NzbDrone");
|
||||
|
||||
_hostController.StopServer();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue