internal void Cleanup(object guff) { var toRemove = new List <int>(); DateTime earliestTime = DateTime.UtcNow.Subtract(_retention); foreach (TaskDetails task in _testFileQueue.GetRunningTasks()) { if (task.IsComplete && task.StartTime.ToUniversalTime() < earliestTime) { toRemove.Add(task.TaskId); } } toRemove.ForEach(_testFileQueue.Remove); }
public IEnumerable <TaskDetails> GetTasks() { return(_fileQueue.GetRunningTasks()); }