mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 20:44:00 +02:00
Commands are stored in memory and prevents duplicate jobs
This commit is contained in:
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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user