diff options
author | paulfantom <paulfantom@gmail.com> | 2016-06-12 11:55:02 +0200 |
---|---|---|
committer | paulfantom <paulfantom@gmail.com> | 2016-06-12 11:55:02 +0200 |
commit | f24aaa8a2594a89cae80c8d9124837daed283f81 (patch) | |
tree | 40cf5e0ea834215a2369d53f8597910141d2b709 /plugins.d | |
parent | 12aaef0f8e94e125654e9b790702979da1a5f5e3 (diff) |
fix timing in python.d charts
Diffstat (limited to 'plugins.d')
-rwxr-xr-x | plugins.d/python.d.plugin | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins.d/python.d.plugin b/plugins.d/python.d.plugin index e59bc3af9c..f761fcdf7c 100755 --- a/plugins.d/python.d.plugin +++ b/plugins.d/python.d.plugin @@ -24,7 +24,7 @@ class PythonCharts(object): modules_configs='../conf.d/'): self.first_run = True self.interval = interval - self.default_priority = 60000 + self.default_priority = 90000 # check if plugin directory exists if not os.path.isdir(modules_path): debug("cannot find charts directory ", modules_path) @@ -72,7 +72,6 @@ class PythonCharts(object): # set priorities for m in self.modules: - print(m.priority) try: m.priority = int(m.priority) except (AttributeError,ValueError): @@ -189,7 +188,7 @@ class PythonCharts(object): self.disable_module(mod, "misbehaving") return t2 = time.time() - if self.first_run: + if not self.first_run: dt = "" else: dt = int((t2 - self.timetable[mod.__name__][0]) * 1000000) @@ -318,6 +317,9 @@ def run(): if out['interval'] is not None: interval = out['interval'] + # configure environement to run modules + #sys.path.append(modules_dir+"python_modules") # append path to directory with modules dependencies + # run plugins charts = PythonCharts(interval, modules, modules_dir, modules_conf) charts.check() |