added members and processor info to job
This commit is contained in:
parent
152885234b
commit
f0beaa7190
3 changed files with 4 additions and 3 deletions
|
|
@ -14,9 +14,11 @@ def generateId():
|
|||
|
||||
|
||||
class Job:
|
||||
def __init__(self, service, host):
|
||||
def __init__(self, service, host, members, processors):
|
||||
self.service = service
|
||||
self.host = host
|
||||
self.members = members
|
||||
self.processors = processors
|
||||
self.jobInfos = []
|
||||
self.jobThreshold = 0
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,5 @@ class TcpconnectService(Service):
|
|||
jobInfo.set_message("Connection successful established to host: " + jobInfo.get_host() + " to port: " + str(self.port))
|
||||
sock.close()
|
||||
|
||||
|
||||
def create(kwargs):
|
||||
return TcpconnectService(**kwargs)
|
||||
|
|
@ -66,7 +66,7 @@ def main():
|
|||
for service in hostgroup.get_services():
|
||||
for host in hostgroup.get_hosts():
|
||||
for period in service.get_periods():
|
||||
job = Job(service, host)
|
||||
job = Job(service, host, hostgroup.get_members(), hostgroup.get_processors())
|
||||
schedulerJob = period.createJob(scheduler, job, handleJob)
|
||||
if schedulerJob is not None:
|
||||
job.set_job(schedulerJob)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue