2
0

Compare commits

..

No commits in common. "a557f8cab5a57acb96a156c04f53032eb684a00e" and "b8bf7bdf30ff6d1b779056a61a73b013f99dd28c" have entirely different histories.

2 changed files with 2 additions and 8 deletions

View File

@ -414,10 +414,8 @@ public static class Tranga_Cli
private static void SearchTasks(TaskManager taskManager, Logger logger)
{
logger.WriteLine("Tranga_CLI", "Menu: Search task");
Console.Clear();
Console.WriteLine("Enter search query:");
string? query = Console.ReadLine();
while (query is null || query.Length < 4)
while (query is null || query.Length < 1)
query = Console.ReadLine();
PrintTasks(taskManager.GetAllTasks().Where(qTask =>
qTask.ToString().ToLower().Contains(query, StringComparison.OrdinalIgnoreCase)).ToArray(), logger);

View File

@ -66,12 +66,8 @@ 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.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