Fix commands not start

This commit is contained in:
2023-02-15 20:30:08 +01:00
parent 30ecc6e515
commit a11cde83ff

View File

@@ -91,10 +91,13 @@ public class CommandScheduler : ICommandScheduler
var commandsToExecute = _commandsToRun.Items.FirstOrDefault()?.CommandsCollection.Collection; var commandsToExecute = _commandsToRun.Items.FirstOrDefault()?.CommandsCollection.Collection;
if (commandsToExecute is null || commandsToExecute.All(c => c.ExecutionState != ExecutionState.Initializing && c.ExecutionState != ExecutionState.Waiting)) return; if (commandsToExecute is null || commandsToExecute.All(c => c.ExecutionState != ExecutionState.Initializing && c.ExecutionState != ExecutionState.Waiting)) return;
foreach (var commandToExecute in commandsToExecute) foreach (var commandToExecute in commandsToExecute)
{ {
if (commandToExecute.ExecutionState != ExecutionState.Waiting) continue; if (commandToExecute.ExecutionState != ExecutionState.Waiting
&& commandToExecute.ExecutionState != ExecutionState.Initializing )
{
continue;
}
var commandExecutor = GetCommandExecutor(); var commandExecutor = GetCommandExecutor();