From 156357285ca80bb0e49034a069c681061d12048b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 11 Jan 2016 23:46:22 -0500 Subject: [PATCH] Dependency: Consistency - Modified the ::getBlockingTasks and ::getBlockedTasks to match the code that performs the dependency scan. While this doesn't change functionality, it does align the logic. --- src/dependency.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dependency.cpp b/src/dependency.cpp index 78d018413..67491f42d 100644 --- a/src/dependency.cpp +++ b/src/dependency.cpp @@ -44,8 +44,8 @@ void dependencyGetBlocked (const Task& task, std::vector & blocked) auto all = context.tdb2.pending.get_tasks (); for (auto& it : all) - if ((it.getStatus () == Task::pending || - it.getStatus () == Task::waiting) && + if (it.getStatus () != Task::completed && + it.getStatus () != Task::deleted && it.has ("depends") && it.get ("depends").find (uuid) != std::string::npos) blocked.push_back (it); @@ -57,8 +57,8 @@ void dependencyGetBlocking (const Task& task, std::vector & blocking) std::string depends = task.get ("depends"); if (depends != "") for (auto& it : context.tdb2.pending.get_tasks ()) - if ((it.getStatus () == Task::pending || - it.getStatus () == Task::waiting) && + if (it.getStatus () != Task::completed && + it.getStatus () != Task::deleted && depends.find (it.get ("uuid")) != std::string::npos) blocking.push_back (it); }