Fixed bug for enqueued tasks constantly being triggered to execute
This commit is contained in:
parent
07ae4af209
commit
e3ec5420c0
@ -66,7 +66,7 @@ public class TaskManager
|
||||
foreach (KeyValuePair<Connector, List<TrangaTask>> connectorTaskQueue in tasksToExecute)
|
||||
{
|
||||
connectorTaskQueue.Value.RemoveAll(task => task.state == TrangaTask.ExecutionState.Waiting);
|
||||
if (connectorTaskQueue.Value.Count > 0 && !connectorTaskQueue.Value.All(task => task.state is TrangaTask.ExecutionState.Running or TrangaTask.ExecutionState.Waiting))
|
||||
if (connectorTaskQueue.Value.Count > 0 && connectorTaskQueue.Value.All(task => task.state is TrangaTask.ExecutionState.Running or TrangaTask.ExecutionState.Enqueued))
|
||||
ExecuteTaskNow(connectorTaskQueue.Value.First());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user