From a557f8cab5a57acb96a156c04f53032eb684a00e Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 20 May 2023 23:12:15 +0200 Subject: [PATCH] Export Data when starting new task --- Tranga/TaskManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tranga/TaskManager.cs b/Tranga/TaskManager.cs index 9c7c411..05cae82 100644 --- a/Tranga/TaskManager.cs +++ b/Tranga/TaskManager.cs @@ -66,8 +66,12 @@ public class TaskManager foreach (KeyValuePair> 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.Enqueued)) + if (connectorTaskQueue.Value.Count > 0 && connectorTaskQueue.Value.All(task => + task.state is TrangaTask.ExecutionState.Running or TrangaTask.ExecutionState.Enqueued)) + { ExecuteTaskNow(connectorTaskQueue.Value.First()); + ExportData(Directory.GetCurrentDirectory()); + } } //Check if task should be executed