diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:27 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:27 +0000 |
commit | eb7cc2640201f168bbd9a05799fd2dbe823bb57c (patch) | |
tree | 1f88da02b7ee3c16ced7b5f7dc4aadb190766e7c /python.d/python_modules/bases/FrameworkServices/SimpleService.py | |
parent | Release v. 1.9.0+dfsg-1 to Unstable (diff) | |
parent | New upstream version 1.10.0+dfsg (diff) | |
download | netdata-eb7cc2640201f168bbd9a05799fd2dbe823bb57c.tar.xz netdata-eb7cc2640201f168bbd9a05799fd2dbe823bb57c.zip |
Update upstream source from tag 'upstream/1.10.0+dfsg'
Update to upstream version '1.10.0+dfsg'
with Debian dir fa5485f3d9aea3038a19eff06ba33374ac5c5d7c
Diffstat (limited to 'python.d/python_modules/bases/FrameworkServices/SimpleService.py')
-rw-r--r-- | python.d/python_modules/bases/FrameworkServices/SimpleService.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/python.d/python_modules/bases/FrameworkServices/SimpleService.py b/python.d/python_modules/bases/FrameworkServices/SimpleService.py index 14c839101..177332c1f 100644 --- a/python.d/python_modules/bases/FrameworkServices/SimpleService.py +++ b/python.d/python_modules/bases/FrameworkServices/SimpleService.py @@ -33,6 +33,7 @@ class RuntimeCounters: self.RETRIES = 0 self.RETRIES_MAX = configuration.pop('retries') self.PENALTY = 0 + self.RUNS = 1 def is_sleep_time(self): return self.START_RUN < self.NEXT_RUN @@ -82,6 +83,10 @@ class SimpleService(Thread, PythonDLimitedLogger, OldVersionCompatibility, objec return self.fake_name or self.name @property + def runs_counter(self): + return self._runtime_counters.RUNS + + @property def update_every(self): return self._runtime_counters.FREQ @@ -178,6 +183,8 @@ class SimpleService(Thread, PythonDLimitedLogger, OldVersionCompatibility, objec self.error('update() unhandled exception: {error}'.format(error=error)) updated = False + job.RUNS += 1 + if not updated: if not self.manage_retries(): return @@ -209,7 +216,10 @@ class SimpleService(Thread, PythonDLimitedLogger, OldVersionCompatibility, objec for chart in self.charts: if chart.flags.obsoleted: - continue + if chart.can_be_updated(data): + chart.refresh() + else: + continue elif self.charts.cleanup and chart.penalty >= self.charts.cleanup: chart.obsolete() self.error("chart '{0}' was suppressed due to non updating".format(chart.name)) |