diff options
author | Erik Andersson <erik@packy.se> | 2016-11-22 23:56:43 +0100 |
---|---|---|
committer | Erik Andersson <erik@packy.se> | 2016-11-22 23:56:43 +0100 |
commit | 41954fffc10bfd230f857f57c6871b412d5f2e91 (patch) | |
tree | 010bcf28f294a58b4a22b7276cf615758648bcbe /src/schedule.h | |
parent | ed374a8dbcdaaf273964293d2805bdd61b148022 (diff) | |
download | ocelot-master.zip ocelot-master.tar.gz ocelot-master.tar.bz2 |
Diffstat (limited to 'src/schedule.h')
-rw-r--r-- | src/schedule.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/schedule.h b/src/schedule.h index 69d910b..3278e50 100644 --- a/src/schedule.h +++ b/src/schedule.h @@ -1,20 +1,24 @@ -#include <ev++.h> -#include <string> -#include <iostream> +#ifndef SCHEDULE_H +#define SCHEDULE_H +#include <ev++.h> class schedule { private: - connection_mother * mother; + void load_config(config * conf); + + unsigned int reap_peers_interval; worker * work; - config * conf; mysql * db; site_comm * sc; uint64_t last_opened_connections; - int counter; - - time_t next_flush; - time_t next_reap_peers; + uint64_t last_request_count; + unsigned int counter; + int next_reap_peers; public: - schedule(connection_mother * mother_obj, worker * worker_obj, config* conf_obj, mysql * db_obj, site_comm * sc_obj); + schedule(config * conf, worker * worker_obj, mysql * db_obj, site_comm * sc_obj); + void reload_config(config * conf); void handle(ev::timer &watcher, int events_flags); + + unsigned int schedule_interval; }; +#endif |