[Buildbot-devel] 'latent' build host on network power switch
Andy Howell
andy at gamubaru.com
Mon Oct 15 04:15:03 UTC 2012
On 10/14/2012 10:45 PM, Dustin J. Mitchell wrote:
> On Sun, Oct 14, 2012 at 11:20 PM, Andy Howell <andy at gamubaru.com> wrote:
>> Does this seem like a reasonable approach?
>
> It does. deferToSlave is not a good tool unless (a) you're using a
> library that doesn't have an asychronous interface and (b) that
> library is threadsafe.
>
> If you're just communicating with a network switch, it'd be best to do
> that using the normal Twisted network-communication techniques.
The two extra classes I'm using are synchronous; one for the ping, and one for the
controlling the power switch.
http://pypi.python.org/pypi/ping/0.2
http://pypi.python.org/pypi/dlipower/0.2.23
The dlipower class uses urllib2, which does not seem thread safe. All its doing is some
html screen scaping using BeautifulSoup, and requesting special urls to control the power.
Maybe I'd be better off to implement that with Twisted.
Thanks,
Andy
More information about the devel
mailing list