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

@ -366,14 +366,12 @@ static bool conversion_task_ctl(AVRO_INSTANCE *inst, bool start)
/** Remove old task and create a new one */
hktask_remove(tasknm);
if (!start || hktask_add(tasknm, converter_func, inst, inst->task_delay))
if (start)
{
rval = true;
}
else
{
MXS_ERROR("Failed to add binlog to Avro conversion task to housekeeper.");
hktask_add(tasknm, converter_func, inst, inst->task_delay);
}
rval = true;
}
return rval;