Changeset 107
- Timestamp:
- 11/22/07 13:03:16 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
projects/AsynCluster/trunk/asyncluster/master/control.py
r94 r107 24 24 25 25 from twisted.python.failure import Failure 26 from twisted.python.reflect import namedObject 26 27 from twisted.internet import defer, reactor, task 27 28 from twisted.spread import pb … … 300 301 return d 301 302 303 def remote_allowClasses(self, *args): 304 """ 305 Instructs my broker to allow the classes specified by the argument(s), 306 and instructs the jobber to have all current and future nodes do the 307 same with their brokers. 308 309 The classes are specified by their string representations:: 310 311 <package(s).module.class> 312 313 """ 314 for stringRep in args: 315 # Load the class for the string representation 316 cls = namedObject(stringRep) 317 # Allow instances of the class, including its type and module 318 pb.globalSecurity.allowInstancesOf(cls) 319 return self.ctl.jobber.allowClasses(*args) 320 302 321 def remote_newJob(self, jobCode, niceness=0): 303 322 """ … … 316 335 """ 317 336 return self.ctl.jobber.update(jobID, callName, *args, **kw) 318 337 319 338 def remote_runJob(self, jobID, callName, *args, **kw): 320 339 """ projects/AsynCluster/trunk/asyncluster/master/jobs.py
r104 r107 120 120 raise Exception("No job registered!") 121 121 122 def allowClasses(self, *args): 123 """ 124 Instructs the controller to allow the classes specified by the 125 argument(s) and arrange and update to have its nodes do the same. 126 127 The classes are specified by their string representations:: 128 129 <package(s).module.class> 130 131 """ 132 return self.root.callRemote('allowClasses', *args) 133 122 134 def run(self, cmd, *args, **kw): 123 135 """
