mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-07-06 02:44:17 +02:00
#40 task timeout criteria
This commit is contained in:
@ -124,7 +124,7 @@ public class TaskManager
|
||||
foreach (KeyValuePair<DownloadChapterTask,Task> removeTask in _runningDownloadChapterTasks)
|
||||
{
|
||||
if (removeTask.Key.GetType() == typeof(DownloadChapterTask) &&
|
||||
DateTime.Now.Subtract(removeTask.Key.executionStarted) > TimeSpan.FromMinutes(10))//TODO better way to check if task has failed?
|
||||
DateTime.Now.Subtract(removeTask.Key.lastChange) > TimeSpan.FromMinutes(3))//3 Minutes since last update to task -> remove
|
||||
{
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Removing failed task {removeTask}.");
|
||||
removeTask.Value.Dispose();
|
||||
|
Reference in New Issue
Block a user