From 2851cd18ec09a26bac9aa4c75ffbd602be8cdef8 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Wed, 22 Jun 2016 12:41:15 +0300 Subject: [PATCH] override update_every only in debug mode --- plugins.d/python.d.plugin | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins.d/python.d.plugin b/plugins.d/python.d.plugin index bb295d3d..f0ff63f1 100755 --- a/plugins.d/python.d.plugin +++ b/plugins.d/python.d.plugin @@ -516,12 +516,10 @@ def parse_cmdline(directory, *commands): mods.append(cmd.replace(".chart.py", "")) else: try: - # FIXME for some reason this overwrites the module configuration - # it should not - it is always passed by netdata to its plugins - # so, the update_every in modules configurations will never be used BASE_CONFIG['update_every'] = int(cmd) - OVERRIDE_UPDATE_EVERY = True - debug(PROGRAM, "overriding update interval to", str(int(cmd))) + if DEBUG_FLAG: + OVERRIDE_UPDATE_EVERY = True + debug(PROGRAM, "overriding update interval to", str(int(cmd))) except ValueError: pass -- 2.39.2