added a queueable agent that will only execute one job at a time

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2484 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-03-29 18:01:13 +00:00
parent 3f69f638d3
commit 0b91f0de2f
2 changed files with 4 additions and 3 deletions

View file

@ -51,8 +51,10 @@ class SampleController(Controller):
jobNumber = 0
agents = (('sample01', 'base.sample'),)
def _getAgents(self):
return [AgentSpecification('sample01', 'base.sample')]
return [AgentSpecification(name, type) for name, type in self.agents]
def enterJob(self, jobType, agent):
self.jobNumber += 1

View file

@ -31,7 +31,6 @@ from cybertools.agent.components import controllers
class SampleController(SampleController):
def _getAgents(self):
return [AgentSpecification('sample01', 'core.sample')]
agents = (('sample01', 'core.sample'),)
controllers.register(SampleController, Master, name='core.sample')