← Back to team overview

pyax team mailing list archive

[Bug 246998] [NEW] pyax needs threading to support concurrent calls

 

Public bug reported:

pyax is blocking when making SOAP calls to the salesforce API as the
beatbox engine uses urllib2.openurl.

Concurrency needs to be added at some level - either in pyax or at the
beatbox level.

twisted's deferToThread can be a great help here.

I believe that beatbox's SoapEnvelope.post call is the best place to
consider first. The call is already built by the time it uses urlopen to
send the request, so there should be no concurrency issues there.

If this call were spun off to a thread:

        try:
            response = urllib2.urlopen(request)
        except urllib2.HTTPError, e:
            # an HTTPError can function as an urlopen response in the case of
            # an error
            response = e

and package the code that processes the response as the callback, this
just might be sufficient.

** Affects: pyax
     Importance: Undecided
         Status: New

-- 
pyax needs threading to support concurrent calls
https://bugs.launchpad.net/bugs/246998
You received this bug notification because you are a member of pyax
Developers, which is the registrant for pyax.



Follow ups

References