too bad, long nights, all good (nearly)

This commit is contained in:
Rafael.Timmerberg 2013-06-21 01:46:08 +02:00
commit b4173f0d6e
5 changed files with 8 additions and 30 deletions

View file

@ -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 + ")")