mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 16:13:58 -07:00
Prevent ProgressMessageTarget from ever reading the command from the database.
This commit is contained in:
parent
6d18b37a94
commit
866f971d41
6 changed files with 52 additions and 39 deletions
|
@ -69,9 +69,9 @@ namespace NzbDrone.Core.Messaging.Commands
|
|||
_commandQueueManager.Start(commandModel);
|
||||
BroadcastCommandUpdate(commandModel);
|
||||
|
||||
if (!MappedDiagnosticsContext.Contains("CommandId"))
|
||||
if (ProgressMessageContext.CommandModel == null)
|
||||
{
|
||||
MappedDiagnosticsContext.Set("CommandId", commandModel.Id.ToString());
|
||||
ProgressMessageContext.CommandModel = commandModel;
|
||||
}
|
||||
|
||||
handler.Execute(command);
|
||||
|
@ -96,9 +96,9 @@ namespace NzbDrone.Core.Messaging.Commands
|
|||
|
||||
_eventAggregator.PublishEvent(new CommandExecutedEvent(commandModel));
|
||||
|
||||
if (MappedDiagnosticsContext.Get("CommandId") == commandModel.Id.ToString())
|
||||
if (ProgressMessageContext.CommandModel == commandModel)
|
||||
{
|
||||
MappedDiagnosticsContext.Remove("CommandId");
|
||||
ProgressMessageContext.CommandModel = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue