This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/18/

On July 22nd, 2014, 1:05 p.m. UTC, Miloslav Trmac wrote:

src/rolekit/server/dbusrole.py (Diff revision 1)
def InstanceAdded(self, name):
293
        role.deploy(values)
296
        role.deploy(values, reply_handler, error_handler)
294
297
295
        return role
298
        reply_handler(role)

Either the role’s deploy method or this method should call the reply_handler; not both

Good point. This is kind of a holdover from the fact that I was allowing the sync behavior to use the async callbacks.

I'm going to finish the async all the way down to do_deploy() which will eliminate this.


- Stephen


On July 22nd, 2014, 1:40 a.m. UTC, Stephen Gallagher wrote:

Review request for RoleKit Mailing List, Miloslav Trmac, Stephen Gallagher, and Thomas Woerner.
By Stephen Gallagher.

Updated July 22, 2014, 1:40 a.m.

Repository: rolekit

Description

This patch passes two callbacks, reply_handler and error_handler
into the deploy() methods. We can pass these handlers down into
asynchronous functions to allow us to avoid blocking on long-
waiting routines.

This patch prepares the system for async operation but the call to
do_deploy() in the rolebase is still synchronous.

Testing

I used d-feet to test the deploy() method on the testrole. It behaves as it used to.

Diffs

  • src/rolekit/server/dbusrole.py (6cef7cfeba6a7bbe396601c7ab31fe034757bc6a)
  • src/rolekit/server/rolebase.py (50b5685a038789d02d3f3b0451f5edaecc187964)

View Diff