- Dependencies were disabled during TDB2 development and not re-enabled.  Oops.
- Removed stray debug statement.
This commit is contained in:
Paul Beckingham 2011-09-11 13:23:47 -04:00
parent dcc0ab19c2
commit 19f598419e
2 changed files with 10 additions and 11 deletions

View file

@ -238,7 +238,7 @@ void E9::operator_negate (Arg& result, Arg& right)
result = coerce (right, Arg::type_number); result = coerce (right, Arg::type_number);
result._value = format (- strtod (result._value.c_str (), NULL)); result._value = format (- strtod (result._value.c_str (), NULL));
std::cout << "# <operator_negate> " << right << " --> " << result << "\n"; // std::cout << "# <operator_negate> " << right << " --> " << result << "\n";
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View file

@ -43,13 +43,15 @@ static bool followUpstream (const Task&, const Task&, std::vector <std::string>&
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// A task is blocked if it depends on tasks that are pending or waiting. // A task is blocked if it depends on tasks that are pending or waiting.
//
// 1 --> 2(pending) = blocked
// 3 --> 4(completed) = not blocked any more
bool dependencyIsBlocked (const Task& task) bool dependencyIsBlocked (const Task& task)
{ {
if (task.has ("depends")) std::string depends = task.get ("depends");
if (depends != "")
{ {
std::string depends = task.get ("depends"); const std::vector <Task>& all = context.tdb2.pending.get_tasks ();
// const std::vector <Task>& all = context.tdb.getAllPending ();
std::vector <Task> all; // TODO Fix.
std::vector <Task>::const_iterator it; std::vector <Task>::const_iterator it;
for (it = all.begin (); it != all.end (); ++it) for (it = all.begin (); it != all.end (); ++it)
if ((it->getStatus () == Task::pending || if ((it->getStatus () == Task::pending ||
@ -66,8 +68,7 @@ void dependencyGetBlocked (const Task& task, std::vector <Task>& blocked)
{ {
std::string uuid = task.get ("uuid"); std::string uuid = task.get ("uuid");
// const std::vector <Task>& all = context.tdb.getAllPending (); const std::vector <Task>& all = context.tdb2.pending.get_tasks ();
std::vector <Task> all; // TODO Fix.
std::vector <Task>::const_iterator it; std::vector <Task>::const_iterator it;
for (it = all.begin (); it != all.end (); ++it) for (it = all.begin (); it != all.end (); ++it)
if ((it->getStatus () == Task::pending || if ((it->getStatus () == Task::pending ||
@ -85,8 +86,7 @@ bool dependencyIsBlocking (const Task& task)
{ {
std::string uuid = task.get ("uuid"); std::string uuid = task.get ("uuid");
// const std::vector <Task>& all = context.tdb.getAllPending (); const std::vector <Task>& all = context.tdb2.pending.get_tasks ();
std::vector <Task> all; // TODO Fix.
std::vector <Task>::const_iterator it; std::vector <Task>::const_iterator it;
for (it = all.begin (); it != all.end (); ++it) for (it = all.begin (); it != all.end (); ++it)
if ((it->getStatus () == Task::pending || if ((it->getStatus () == Task::pending ||
@ -104,8 +104,7 @@ void dependencyGetBlocking (const Task& task, std::vector <Task>& blocking)
std::string depends = task.get ("depends"); std::string depends = task.get ("depends");
if (depends != "") if (depends != "")
{ {
// const std::vector <Task>& all = context.tdb.getAllPending (); const std::vector <Task>& all = context.tdb2.pending.get_tasks ();
std::vector <Task> all; // TODO Fix.
std::vector <Task>::const_iterator it; std::vector <Task>::const_iterator it;
for (it = all.begin (); it != all.end (); ++it) for (it = all.begin (); it != all.end (); ++it)
if ((it->getStatus () == Task::pending || if ((it->getStatus () == Task::pending ||