fixed __init__() method

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2464 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-03-21 13:10:18 +00:00
parent a3b17ec3c0
commit 2ff4d5ac22
2 changed files with 4 additions and 1 deletions

View file

@ -84,6 +84,9 @@ class Master(Agent):
class SampleAgent(Agent):
def __init__(self, parent):
self.parent = parent
def execute(self, job, params=None):
print 'Job %s on agent %s has been executed.' % (job.identifier, self.name)
self.log(job)

View file

@ -39,7 +39,7 @@ class Scheduler(object):
self.queue = []
def schedule(self, job, startTime=None):
job. startTime = startTime or int(time())
job.startTime = startTime or int(time())
self.queue.append(job)
job.execute() # the sample scheduler does not care about startTime