Skip to content

Commit 01f7fbc

Browse files
committed
fix: delete list with names of refactored class
1 parent a203518 commit 01f7fbc

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

mamonsu/lib/runner.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def quit_handler(_signo=None, _stack_frame=None):
2626
if platform.LINUX:
2727
signal.signal(signal.SIGQUIT, quit_handler)
2828
# temporal list to keep names of all refactored classes
29-
refactored_classes = ["Oldest", "PgBufferCache", "ArchiveCommand", "BgWriter", "Checkpoint", "Connections",
30-
"Databases", "PgHealth", "Instance", "PgLocks", "Xlog",
31-
"PgStatProgressVacuum", "PgStatStatement", "PgWaitSampling", "La", "OpenFiles",
32-
"SystemUptime", "ProcStat", "Net", "Memory", "DiskStats", "DiskSizes", "DefConfTest",
33-
"Health"]
29+
#refactored_classes = ["Oldest", "PgBufferCache", "ArchiveCommand", "BgWriter", "Checkpoint", "Connections",
30+
# "Databases", "PgHealth", "Instance", "PgLocks", "Xlog",
31+
# "PgStatProgressVacuum", "PgStatStatement", "PgWaitSampling", "La", "OpenFiles",
32+
# "SystemUptime", "ProcStat", "Net", "Memory", "DiskStats", "DiskSizes", "DefConfTest",
33+
# "Health"]
3434
commands = sys.argv[1:]
3535
if len(commands) > 0:
3636
tool = commands[0]
@@ -91,8 +91,8 @@ def quit_handler(_signo=None, _stack_frame=None):
9191
if args.plugin_type == 'pg' or args.plugin_type == 'sys' or args.plugin_type == 'all':
9292
# check if conf file has a path
9393
len_path = commands[2].rfind("/")
94-
#print(len_path)
95-
#print(len(commands[2]))
94+
# print(len_path)
95+
# print(len(commands[2]))
9696
# get path for conf file and scripts
9797
if len_path != -1:
9898
path = commands[2][:len_path] + "/scripts"
@@ -138,13 +138,12 @@ def quit_handler(_signo=None, _stack_frame=None):
138138
Plugin.Type = 'agent' # change plugin type for template generator
139139
plugins = []
140140
for klass in Plugin.only_child_subclasses():
141-
if klass.__name__ in refactored_classes:
142-
if klass.__name__ == "PgWaitSampling": # check if plugin is for EE
143-
if Plugin.VersionPG['type'] == 'PGEE':
144-
plugins.append(klass(cfg))
145-
else:
146-
if klass.__name__ != "Cfs":
147-
plugins.append(klass(cfg))
141+
if klass.__name__ == "PgWaitSampling": # check if plugin is for EE
142+
if Plugin.VersionPG['type'] == 'PGEE':
143+
plugins.append(klass(cfg))
144+
else:
145+
if klass.__name__ != "Cfs":
146+
plugins.append(klass(cfg))
148147
template = ZbxTemplate(args.template, args.application)
149148
with codecs.open(commands[2], 'w', 'utf-8') as f:
150149
f.write(template.xml(plugins))

0 commit comments

Comments
 (0)