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:
parent
a3b17ec3c0
commit
2ff4d5ac22
2 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue