Current Path : /usr/lib/python2.7/dist-packages/landscape/lib/ |
Current File : //usr/lib/python2.7/dist-packages/landscape/lib/message.pyc |
ó ÍÿŠTc @ s d Z d Z d „ Z d S( s/ Helpers for reliable persistent message queues.i c C sŒ d } | j ƒ } | | k r5 | j ƒ | | } n9 | | | j ƒ k rZ d } t } n | j ƒ | | } | j | ƒ | j | ƒ | S( s Our peer has told us what it expects our next message's sequence to be. Call this with the message store and sequence number that the peer wants next; this will do various things based on what *this* side has in its outbound queue store. 1. The peer expects a sequence greater than what we last sent. This is the common case and generally it should be expecting last_sent_sequence+len(messages_sent)+1. 2. The peer expects a sequence number our side has already sent, and we no longer have that message. In this case, just send *all* messages we have, including the previous generation, starting at the sequence number the peer expects (meaning that messages have probably been lost). 3. The peer expects a sequence number we already sent, and we still have that message cached. In this case, we send starting from that message. If the next expected sequence from the server refers to a message older than we have, then L{ANCIENT} will be returned. i N( t Nonet get_sequencet delete_old_messagest get_pending_offsett ANCIENTt set_pending_offsett set_sequence( t storet next_expectedt rett old_sequencet pending_offset( ( s9 /usr/lib/python2.7/dist-packages/landscape/lib/message.pyt got_next_expected s N( t __doc__R R ( ( ( s9 /usr/lib/python2.7/dist-packages/landscape/lib/message.pyt <module> s