dinkey code to debug

This commit is contained in:
Rafael.Timmerberg 2013-06-20 00:40:34 +02:00
commit d62d79753e
2 changed files with 8 additions and 6 deletions

View file

@ -27,7 +27,7 @@ class HostGroup:
self.add_hosts(kwargs[tmp]) self.add_hosts(kwargs[tmp])
tmp = "services" tmp = "services"
self.services = [] self._services = []
if not tmp in kwargs: if not tmp in kwargs:
raise HostGroupMissingArgumentException(tmp, name) raise HostGroupMissingArgumentException(tmp, name)
self.add_services(kwargs[tmp]) self.add_services(kwargs[tmp])
@ -80,7 +80,7 @@ class HostGroup:
return self.processors return self.processors
def get_services(self): def get_services(self):
return self.services return self._services
def get_hosts(self): def get_hosts(self):
return self.hosts return self.hosts

View file

@ -64,10 +64,12 @@ def main():
for layout in layouts: for layout in layouts:
if layout.is_enabled(): if layout.is_enabled():
for hg in layout.get_hostgroups(): for hg in layout.get_hostgroups():
for services in hg.get_services(): for sr in hg.get_services():
for service in services: if not isinstance(sr, list):
for period in service.get_periods(): sr = sr.get_hostgroup().get_services()
jobs.append(period.createJob(scheduler, service, handleJob)) for s in sr:
for period in s.get_periods():
jobs.append(period.createJob(scheduler, s, handleJob))
scheduler.start() scheduler.start()
#log.i("starting linspector: reading config... (" + args.config + ")") #log.i("starting linspector: reading config... (" + args.config + ")")