PipelineFX Forum
Qube! => Developer Customization => Topic started by: pboucher on November 09, 2007, 08:41:38 PM
-
I think the examples should read:
qb.workerlock({}, 'host.processor_0=1,host.processor_1=1', name='myhost')
qb.workerlock({}, 'host.processor_all=0', name='myhost')
qb.workerlock({}, 'host.processor_all=1', name='myhost')
qb.workerlock({}, 'host.lock_mode=aggressive,host.processor_all=watchdog 30', name='myhost')
otherwise the method definition should read:
def workerlock(filters=None, lockingString='host.processor_all=1', name=None):
if filters.has_key('name') == False and name == None:
raise SomeException
...
-
Thank you for the python docs and usability suggestion. We will see about incorporating it in an upcoming release.
-
By using the above method definition could I even suggest there be a lock method on the host object. The host object supplies the name and with the defaults, one could do the following to lock a bunch of workers:
for h in qb.hostinfo():
if [my logic on h]:
h.lock()
-
Thank you again.
The workerlock() function is being updated with improved error checking to address your reported issue and suggestion. We plan to further enhance it by adding 'lock' and 'purge' parameter shortcuts to make it easier to use. Below is the planned prototype.
def workerlock(filters={}, lockingString='', name=None, lock=None, purge=False):
Your feature suggestion for making the Qube classes (Job, Host, etc) more object oriented has also been logged and will be prioritized with our other development items.
Regards,
Scot
-
Excellent news. Thanks!