@cryptotaxi247 / netdata-1 / commits / 6db01d718

handling of debug interval

paulfantom committed Jun 18, 2016 at 13:53 UTC 6db01d718f189251988c5658ad434f18498ea38b
2 files changed +10 -3
plugins.d/python.d.plugin
+5
@@ -45,6 +45,11 @@ class PythonCharts(object):
45
46 # good economy and prosperity:
47 self.jobs = self._create_jobs(configured_modules)
48 + if DEBUG_FLAG:
49 + if interval is None:
50 + interval = 1
51 + for job in self.jobs:
52 + job._create_timetable(interval)
53
54
55 def _create_jobs(self,modules):
python.d/python_modules/base.py
+5 -3
@@ -22,11 +22,13 @@ class BaseService(object):
22 self.retries = int(config['retries'])
23 self.retries_left = self.retries
24
25 - def _create_timetable(self):
25 + def _create_timetable(self,freq=None):
26 + if freq is None:
27 + freq = self.update_every
28 now = time()
29 self.timetable = {'last' : now,
28 - 'next' : now - (now % self.update_every) + self.update_every,
29 - 'freq' : self.update_every}
30 + 'next' : now - (now % freq) + freq,
31 + 'freq' : freq}
32
33
34 def error(self, msg, exception=""):