MXS-1506: Move housekeeping into Housekeeper class

Moved the main task processing code into a class.
This commit is contained in:
Markus Mäkelä
2018-04-02 14:48:33 +03:00
parent b33f464eea
commit 67b2f24be1
2 changed files with 132 additions and 97 deletions

View File

@ -22,26 +22,6 @@
MXS_BEGIN_DECLS
typedef enum
{
HK_REPEATED = 1,
HK_ONESHOT
} HKTASK_TYPE;
/**
* The housekeeper task list
*/
typedef struct hktask
{
char *name; /*< A simple task name */
void (*task)(void *data); /*< The task to call */
void *data; /*< Data to pass the task */
int frequency; /*< How often to call the tasks (seconds) */
time_t nextdue; /*< When the task should be next run */
HKTASK_TYPE type; /*< The task type */
struct hktask *next; /*< Next task in the list */
} HKTASK;
/**
* Initialises the housekeeper mechanism.
*