mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Commands are stored in memory and prevents duplicate jobs
This commit is contained in:
parent
a86c131761
commit
c917cdc0cc
16 changed files with 244 additions and 13 deletions
29
NzbDrone.Common/Messaging/Manager/CommandManagerItem.cs
Normal file
29
NzbDrone.Common/Messaging/Manager/CommandManagerItem.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
|
||||
namespace NzbDrone.Common.Messaging.Manager
|
||||
{
|
||||
public class CommandManagerItem
|
||||
{
|
||||
public String Type { get; set; }
|
||||
public ICommand Command { get; set; }
|
||||
public CommandState State { get; set; }
|
||||
|
||||
public CommandManagerItem()
|
||||
{
|
||||
}
|
||||
|
||||
public CommandManagerItem(ICommand command, CommandState state)
|
||||
{
|
||||
Type = command.GetType().FullName;
|
||||
Command = command;
|
||||
State = state;
|
||||
}
|
||||
}
|
||||
|
||||
public enum CommandState
|
||||
{
|
||||
Running = 0,
|
||||
Completed = 1,
|
||||
Failed = 2
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue