From 9a0cae862aff8c4a53a421afcdb568224b9924c1 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 2 Jul 2012 15:08:54 +0200 Subject: [PATCH] Added freshness_interval config setting. --- cib/service.cpp | 9 +++++++++ cib/service.h | 1 + 2 files changed, 10 insertions(+) diff --git a/cib/service.cpp b/cib/service.cpp index 60837c6c9..495341068 100644 --- a/cib/service.cpp +++ b/cib/service.cpp @@ -84,6 +84,15 @@ long Service::GetRetryInterval(void) const return value; } +long Service::GetFreshnessInterval(void) const +{ + long value; + if (!GetConfigObject()->GetProperty("freshness_interval", &value)); + value = GetCheckInterval() * 3; + + return value; +} + Dictionary::Ptr Service::GetDependencies(void) const { Dictionary::Ptr value; diff --git a/cib/service.h b/cib/service.h index 383dd2698..8e7874348 100644 --- a/cib/service.h +++ b/cib/service.h @@ -40,6 +40,7 @@ public: long GetMaxCheckAttempts(void) const; long GetCheckInterval(void) const; long GetRetryInterval(void) const; + long GetFreshnessInterval(void) const; Dictionary::Ptr GetDependencies(void) const; Dictionary::Ptr GetGroups(void) const;