diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2018-03-19 00:16:25 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2018-03-19 00:16:25 +0100 |
| commit | 5a2fe9e2f226db509315c8e4290e9794a0ce0557 (patch) | |
| tree | 0db07881c59560d7bc7ba5a3f0b30ac16368c9d6 /src/blissful_monitor.cc | |
| parent | 66537685abb429be69ea2f82db6eca0c79e0f218 (diff) | |
Expand fake monitor to make testing removing machines easier
Diffstat (limited to 'src/blissful_monitor.cc')
| -rw-r--r-- | src/blissful_monitor.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/blissful_monitor.cc b/src/blissful_monitor.cc index 0f23970..8addc45 100644 --- a/src/blissful_monitor.cc +++ b/src/blissful_monitor.cc @@ -9,7 +9,11 @@ namespace { +#if FAKE_MONITOR +static const double JOB_EXPIRE_S = 1 * 60.0; // 1 min +#else static const double JOB_EXPIRE_S = 10 * 60.0; // 10 min +#endif class BlissfulMonitorImpl : public BlissfulMonitor, private Monitor::Observer { public: @@ -57,6 +61,12 @@ public: observers_.remove(observer); } +#if FAKE_MONITOR + void toggle_fakes() override { + monitor_->toggle_fakes(); + } +#endif + private: struct Job { uint32_t source; |
