Only list tasks that are not already running when asking to execute now.

This commit is contained in:
glax 2023-05-21 03:21:34 +02:00
parent 294b819ff0
commit 636d17d287

View File

@ -325,7 +325,7 @@ public static class Tranga_Cli
private static void ExecuteTaskNow(TaskManager taskManager, Logger logger)
{
logger.WriteLine("Tranga_CLI", "Menu: Executing Task");
TrangaTask[] tasks = taskManager.GetAllTasks();
TrangaTask[] tasks = taskManager.GetAllTasks().Where(nTask => nTask.state is not TrangaTask.ExecutionState.Running).ToArray();
TrangaTask? selectedTask = SelectTask(tasks, logger);
if (selectedTask is null)