mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Command queue
New: Adding multiple series will queue them instead of running all at once New: Slower scheduled tasks won't be block others from running
This commit is contained in:
@@ -11,5 +11,13 @@ namespace NzbDrone.Core.Update.Commands
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override string CompletionMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Restarting Sonarr to apply updates";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace NzbDrone.Core.Update
|
||||
return;
|
||||
}
|
||||
|
||||
if (OsInfo.IsNotWindows && !_configFileProvider.UpdateAutomatically && !message.Manual)
|
||||
if (OsInfo.IsNotWindows && !_configFileProvider.UpdateAutomatically && message.Trigger != CommandTrigger.Manual)
|
||||
{
|
||||
_logger.ProgressDebug("Auto-update not enabled, not installing available update.");
|
||||
return;
|
||||
@@ -200,23 +200,21 @@ namespace NzbDrone.Core.Update
|
||||
try
|
||||
{
|
||||
InstallUpdate(latestAvailable);
|
||||
|
||||
message.Completed("Restarting Sonarr to apply updates");
|
||||
}
|
||||
catch (UpdateFolderNotWritableException ex)
|
||||
{
|
||||
_logger.ErrorException("Update process failed", ex);
|
||||
message.Failed(ex, string.Format("Startup folder not writable by user '{0}'", Environment.UserName));
|
||||
throw new CommandFailedException("Startup folder not writable by user '{0}'", ex, Environment.UserName);
|
||||
}
|
||||
catch (UpdateVerificationFailedException ex)
|
||||
{
|
||||
_logger.ErrorException("Update process failed", ex);
|
||||
message.Failed(ex, "Downloaded update package is corrupt");
|
||||
throw new CommandFailedException("Downloaded update package is corrupt", ex);
|
||||
}
|
||||
catch (UpdateFailedException ex)
|
||||
{
|
||||
_logger.ErrorException("Update process failed", ex);
|
||||
message.Failed(ex);
|
||||
throw new CommandFailedException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user