2018-08-28 14:43:46 +00:00
|
|
|
#ifndef ODYSSEY_CRON_H
|
|
|
|
#define ODYSSEY_CRON_H
|
2018-03-02 13:12:32 +00:00
|
|
|
|
|
|
|
/*
|
2018-03-12 14:03:15 +00:00
|
|
|
* Odyssey.
|
2018-03-02 13:12:32 +00:00
|
|
|
*
|
2018-04-04 13:19:58 +00:00
|
|
|
* Scalable PostgreSQL connection pooler.
|
2020-04-02 11:00:56 +00:00
|
|
|
*/
|
2018-03-02 13:12:32 +00:00
|
|
|
|
|
|
|
typedef struct od_cron od_cron_t;
|
|
|
|
|
2020-12-28 10:43:31 +00:00
|
|
|
struct od_cron {
|
2020-04-02 11:00:56 +00:00
|
|
|
uint64_t stat_time_us;
|
2018-03-13 13:17:27 +00:00
|
|
|
od_global_t *global;
|
2020-01-17 05:02:59 +00:00
|
|
|
od_atomic_u64_t startup_errors;
|
2021-03-05 09:29:30 +00:00
|
|
|
|
|
|
|
pthread_mutex_t lock;
|
|
|
|
int online;
|
2018-03-02 13:12:32 +00:00
|
|
|
};
|
|
|
|
|
2020-12-28 10:43:31 +00:00
|
|
|
void od_cron_init(od_cron_t *);
|
|
|
|
int od_cron_start(od_cron_t *, od_global_t *);
|
2018-03-02 13:12:32 +00:00
|
|
|
|
2018-08-28 14:43:46 +00:00
|
|
|
#endif /* ODYSSEY_CRON_H */
|