def _processOutgoing(self, delivery): link = proton.pn_delivery_link(delivery) msg = proton.pn_delivery_get_context(delivery) proton.pn_link_send(link, msg) if proton.pn_link_advance(link): self.log.debug("Delivery finished (%s)", proton.pn_delivery_tag(delivery)) proton.pn_delivery_set_context(delivery, time.time())
def _processOutgoing(self, delivery): link = proton.pn_delivery_link(delivery) msg = proton.pn_delivery_get_context(delivery) proton.pn_link_send(link, msg) if proton.pn_link_advance(link): self.log.debug("Delivery finished (%s)", proton.pn_delivery_tag(delivery)) proton.pn_delivery_set_context(delivery, time.time())
def _processOutgoing(self, delivery): link = proton.pn_delivery_link(delivery) msg = proton.pn_link_get_context(link) sent = proton.pn_link_send(link, msg) if sent < 0: self.log.warn("Problem sending message") else: msg = msg[sent:] if len(msg) != 0: self.log.debug("Delivery partial") proton.pn_link_set_context(link, msg) else: self.log.debug("Delivery finished") proton.pn_link_set_context(link, "") proton.pn_delivery_set_context(delivery, time.time()) proton.pn_link_advance(link)