add sea config information to sea list

+ fixed servman import (must be __init__)
This commit is contained in:
2020-11-03 12:06:29 +01:00
parent fcd85f1ca4
commit eee6c22b87
4 changed files with 22 additions and 10 deletions

View File

@ -154,12 +154,12 @@ class ServiceManager:
self.get_info()
return self.info[ins]
#def get_cfg(self, service, cmd):
# """return info about running program, if relevant
#
# example for frappy: return cfg
# """
# return ''
def get_cfg(self, service):
"""return cfg info about running programs, if relevant
example for sea: return samenv name
"""
return ''
def get_procs(self, groups=None, cfginfo=None):
"""return processes
@ -364,11 +364,12 @@ class ServiceManager:
for serv, port in info_grp.items():
plist = procs_dict.get(serv)
if plist:
cfg = cfginfo.get((ins_i, serv), '') or sm.get_cfg(serv)
if sm == self:
show_ins = True
gs = '%s %s' % (group, serv)
port = str(port or '')
run_info.append(('', gs, port, cfginfo.get((ins_i, serv), '')))
run_info.append(('', gs, port, cfg))
if len(plist) > 1:
rows.append(['', ' WARNING: multiple processes %s'
% ', '.join(str(p.pid) for p, _ in plist)])