summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@opera.com>2017-10-31 16:35:11 +0100
committerJoel Klinghed <the_jk@opera.com>2017-10-31 16:35:11 +0100
commitf4602c1bb6f9fe4090ace211c5013f71653bcd4c (patch)
treeecda369875a1411e6902e4425d58bca5c8b01826 /src/main.cc
parent38140372d8c8dd32267943d5d79b2ce2c0a032fb (diff)
Add a blissful monitor proxy
It takes a given monitor and "fixes" calls from it by expiring "dead" jobs (jobs older than 10min) and by sanitychecking that hosts exist and such
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cc b/src/main.cc
index fdf2e61..62620c8 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -15,6 +15,7 @@
#include "animation.hh"
#include "animator.hh"
#include "args.hh"
+#include "blissful_monitor.hh"
#include "fake_monitor.hh"
#include "io.hh"
#include "monitor.hh"
@@ -222,11 +223,13 @@ public:
}
void connect(Args const* args) {
+ std::unique_ptr<Monitor> monitor;
#if FAKE_MONITOR
- monitor_ = FakeMonitor::create(looper_);
+ monitor = FakeMonitor::create(looper_);
#else
- monitor_ = Monitor::create(looper_);
+ monitor = Monitor::create(looper_);
#endif
+ monitor_ = BlissfulMonitor::create(looper_, std::move(monitor));
monitor_->add_observer(this);
monitor_->connect(args->arg("network", ""),
args->arg("scheduler", ""));