MXS-1506: Move all functionality into Housekeeper

The class now does all of the work and the API wraps the calls to the
member methods. Using an STL container makes the list management a lot
more convenient.
This commit is contained in:
Markus Mäkelä
2018-04-02 15:23:51 +03:00
parent 67b2f24be1
commit 96a0aae7fe
4 changed files with 143 additions and 249 deletions

View File

@ -1454,14 +1454,8 @@ bool session_delay_routing(MXS_SESSION* session, MXS_DOWNSTREAM down, GWBUF* buf
std::auto_ptr<TaskAssignment> job(new TaskAssignment(task, worker));
TaskAssignment* pJob = job.release();
if (hktask_oneshot(name.str().c_str(), delayed_routing_cb, pJob, seconds))
{
success = true;
}
else
{
delete pJob;
}
hktask_oneshot(name.str().c_str(), delayed_routing_cb, pJob, seconds);
success = true;
}
catch (std::bad_alloc)
{