From f4602c1bb6f9fe4090ace211c5013f71653bcd4c Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 31 Oct 2017 16:35:11 +0100 Subject: 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 --- src/main.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.cc') 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; #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", "")); -- cgit v1.3