@cryptotaxi247 / netdata-1 / commits / 2851cd18e

override update_every only in debug mode

Costa Tsaousis committed Jun 22, 2016 at 12:41 UTC 2851cd18ec09a26bac9aa4c75ffbd602be8cdef8
1 file changed +3 -5
plugins.d/python.d.plugin
+3 -5
@@ -516,12 +516,10 @@ def parse_cmdline(directory, *commands):
516 mods.append(cmd.replace(".chart.py", ""))
517 else:
518 try:
519 - # FIXME for some reason this overwrites the module configuration
520 - # it should not - it is always passed by netdata to its plugins
521 - # so, the update_every in modules configurations will never be used
519 BASE_CONFIG['update_every'] = int(cmd)
523 - OVERRIDE_UPDATE_EVERY = True
524 - debug(PROGRAM, "overriding update interval to", str(int(cmd)))
520 + if DEBUG_FLAG:
521 + OVERRIDE_UPDATE_EVERY = True
522 + debug(PROGRAM, "overriding update interval to", str(int(cmd)))
523 except ValueError:
524 pass
525