too bad, long nights, all good (nearly)
This commit is contained in:
parent
73c2c2cd92
commit
1f095725b6
5 changed files with 8 additions and 30 deletions
24
linspector
24
linspector
|
|
@ -62,29 +62,11 @@ def main():
|
|||
|
||||
jobs = []
|
||||
for layout in layouts:
|
||||
#for i in range(len(layout._hostgroups)):
|
||||
# for y in range(len(layout._hostgroups[i])._services):
|
||||
# for period in layout.get_hostgroups()[i]._services[y]:
|
||||
# log.i("wtf")
|
||||
# for serv in layout.get_hostgroups()[i].get_services():
|
||||
# for service in serv:
|
||||
# for period in service.get_periods():
|
||||
# pass
|
||||
|
||||
if layout.is_enabled():
|
||||
for hostgroup in layout.get_hostgroups():
|
||||
for sr in hostgroup.get_services():
|
||||
if not isinstance(sr, list):
|
||||
|
||||
log.i("check from hostgroup: id(" + str(id(hostgroup)) + ") " + str(hostgroup))
|
||||
log.i("check from sr.get_hostgroup(): id(" + str(id(sr.get_hostgroup)) + ") " + str(sr.get_hostgroup()))
|
||||
sr = hostgroup.__dict__["_HostGroup__services"]
|
||||
|
||||
if not isinstance(sr, list):
|
||||
sr = sr.get_hostgroup().get_services()
|
||||
for s in sr:
|
||||
for period in s.get_periods():
|
||||
jobs.append(period.createJob(scheduler, s, handleJob))
|
||||
for service in hostgroup.s:
|
||||
for period in service.get_periods():
|
||||
jobs.append(period.createJob(scheduler, service, handleJob))
|
||||
scheduler.start()
|
||||
|
||||
#log.i("starting linspector: reading config... (" + args.config + ")")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue