diff options
author | Rob Austein <sra@hactrn.net> | 2012-05-10 16:18:51 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-05-10 16:18:51 +0000 |
commit | 85ef88ddb731a9980e6fd40cc125964b75b2d958 (patch) | |
tree | 600d2a08f813cfd4dd528c1035e32c1fa2356a48 | |
parent | 24c40df4555158a2aeb243c3937b195c250a4fda (diff) |
We only need to poke requested handles once per synchronize call, not
every time through inner loop. Fixes #248.
svn path=/trunk/; revision=4484
-rw-r--r-- | rpkid/rpki/irdb/zookeeper.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/rpkid/rpki/irdb/zookeeper.py b/rpkid/rpki/irdb/zookeeper.py index 17f057de..b465e556 100644 --- a/rpkid/rpki/irdb/zookeeper.py +++ b/rpkid/rpki/irdb/zookeeper.py @@ -1260,11 +1260,6 @@ class Zookeeper(object): pubd_query.extend(rpki.publication.client_elt.make_pdu( action = "destroy", client_handle = p) for p in client_pdus) - # Poke rpkid to run immediately for any requested handles. - - rpkid_query.extend(rpki.left_right.self_elt.make_pdu( - action = "set", self_handle = h, run_now = "yes") for h in handles_to_poke) - # If we changed anything, ship updates off to daemons if rpkid_query: @@ -1279,8 +1274,8 @@ class Zookeeper(object): pubd_reply = self.call_pubd(*pubd_query) self.check_error_report(pubd_reply) - # Finally, clean up any <self/> objects rpkid might be holding - # that don't match ResourceCA object. + # Clean up any <self/> objects rpkid might be holding that don't + # match a ResourceCA object. rpkid_reply = self.call_rpkid(rpki.left_right.self_elt.make_pdu(action = "list")) self.check_error_report(rpkid_reply) @@ -1291,5 +1286,12 @@ class Zookeeper(object): rpkid_query = [rpki.left_right.self_elt.make_pdu(action = "destroy", self_handle = handle) for handle in (self_handles - ca_handles)] - rpkid_reply = self.call_rpkid(*rpkid_query) - self.check_error_report(rpkid_reply) + + # Poke rpkid to run immediately for any requested handles. + + rpkid_query.extend(rpki.left_right.self_elt.make_pdu( + action = "set", self_handle = h, run_now = "yes") for h in handles_to_poke) + + if rpkid_query: + rpkid_reply = self.call_rpkid(*rpkid_query) + self.check_error_report(rpkid_reply) |