make job params accessible to agent
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2511 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
104d0ac88f
commit
c998205e18
3 changed files with 3 additions and 0 deletions
|
@ -93,6 +93,7 @@ class Master(Agent):
|
|||
job.agent = self.children[spec.agent]
|
||||
job.identifier = spec.identifier
|
||||
job.controller = controller
|
||||
job.params = spec.params
|
||||
self.scheduler.schedule(job, spec.startTime)
|
||||
|
||||
def notify(self, job, result=None, message=''):
|
||||
|
|
|
@ -92,6 +92,7 @@ class JobSpecification(object):
|
|||
def __init__(self, type, identifier, **kw):
|
||||
self.type = type
|
||||
self.identifier = identifier
|
||||
self.params = kw.pop('params', {})
|
||||
for k, v in kw.items():
|
||||
setattr(self, k, v)
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ class QueueableAgent(Agent):
|
|||
def execute(self, job):
|
||||
job.state = states.running
|
||||
self.currentJob = job
|
||||
self.params = job.params
|
||||
d = self.process()
|
||||
d.addCallbacks(self.completed, self.error)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue