Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
contego / home / tvault / .virtenv / lib / python2.7 / site-packages / kombu / message.pyc
Size: Mime:
ó
öEYc@@sËdZddlmZmZddlZddlmZddlmZddl	m
Z
mZmZddl
mZdd	lmZd
gZddd
hZeedƒZe
defd„ƒYƒZdS(uMessage class.i(tabsolute_importtunicode_literalsNi(t
decompress(tMessageStateError(tpython_2_unicode_compatibletreraisettext_t(tloads(t
dictfilteruMessageuACKuREJECTEDuREQUEUEDupypy_version_infotMessagecB@sÎeZdZeZdZes'dZnddddidddddd
„
Zdd„Z	e
d„Ze
d„Ze
d„Z
e
d„Zd„Zd„Zd„Zed„ƒZed„ƒZd„ZRS(u`Base class for received messages.

    Keyword Arguments:

        channel (ChannelT): If message was received, this should be the
            channel that the message was received on.

        body (str): Message body.

        delivery_mode (bool): Set custom delivery mode.
            Defaults to :attr:`delivery_mode`.

        priority (int): Message priority, 0 to broker configured
            max priority, where higher is better.

        content_type (str): The messages content_type.  If content_type
            is set, no serialization occurs as it is assumed this is either
            a binary object, or you've done your own serialization.
            Leave blank if using built-in serialization as our library
            properly sets content_type.

        content_encoding (str): The character set in which this object
            is encoded. Use "binary" if sending in raw binary objects.
            Leave blank if using built-in serialization as our library
            properly sets content_encoding.

        properties (Dict): Message properties.

        headers (Dict): Message headers.
    u_stateuchanneludelivery_tagucontent_typeucontent_encodingu
delivery_infouheadersu
propertiesubodyu_decoded_cacheuacceptu__dict__c

K@sU|jdkrgn|j|_|
|_||_||_||_||_|pWi|_|pfi|_d|_	d|_
|	|_|jjdƒ}|jré|réyt
||ƒ}Wqétk
rå|jjtjƒƒqéXn|jrH|rHt|tƒrHy|j|ƒ}WqHtk
rD|jjtjƒƒqHXn||_dS(NuRECEIVEDucompression(terrorstNonetchanneltdelivery_tagtcontent_typetcontent_encodingt
delivery_infotheaderst
propertiest_decoded_cachet_statetaccepttgetRt	Exceptiontappendtsystexc_infot
isinstanceRtencodetbody(
tselfRR
RRRRRt
postencodeRRtkwargstcompression((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyt__init__?s.!								

cC@sHyt|jdŒWn,tk
rC}|s3‚n|||ƒnXdS(Ni(RR
R(Rtcallbacktexc((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyt_reraise_error]scC@s»|jdkr!|jdƒ‚n|jjdk	rqy|jd}Wntk
rWqqX||jjkrqdSn|jr•|jdj|ƒƒ‚n|jj|j	d|ƒd|_
dS(uëAcknowledge this message as being processed.

        This will remove the message from the queue.

        Raises:
            MessageStateError: If the message has already been
                acknowledged/requeued/rejected.
        u.This message does not have a receiving channeluconsumer_tagNu3Message already acknowledged with state: {0._state}tmultipleuACK(RRRtno_ack_consumersRtKeyErrortacknowledgedtformatt	basic_ackR
R(RR&tconsumer_tag((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pytackes 	
	cC@sJy|jd|ƒWn/|k
rE}|jd|j|dtƒnXdS(NR&uCouldn't ack %r, reason:%rR(R-tcriticalR
tTrue(RtloggerR
R&R$((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyt
ack_log_error€s
	cC@sJy|jd|ƒWn/|k
rE}|jd|j|dtƒnXdS(NtrequeueuCouldn't reject %r, reason: %rR(trejectR.R
R/(RR0R
R2R$((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pytreject_log_error‡s
	cC@sk|jdkr!|jdƒ‚n|jrE|jdj|ƒƒ‚n|jj|jd|ƒd|_dS(uÓReject this message.

        The message will be discarded by the server.

        Raises:
            MessageStateError: If the message has already been
                acknowledged/requeued/rejected.
        u.This message does not have a receiving channelu3Message already acknowledged with state: {0._state}R2uREJECTEDN(RRRR)R*tbasic_rejectR
R(RR2((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyR3Žs		cC@sk|jdkr!|jdƒ‚n|jrE|jdj|ƒƒ‚n|jj|jdtƒd|_dS(u.Reject this message and put it back on the queue.

        Warning:
            You must not use this method as a means of selecting messages
            to process.

        Raises:
            MessageStateError: If the message has already been
                acknowledged/requeued/rejected.
        u.This message does not have a receiving channelu3Message already acknowledged with state: {0._state}R2uREQUEUEDN(	RRRR)R*R5R
R/R(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyR2¡s	cC@s"|js|jƒ|_n|jS(uÙDeserialize the message body.

        Returning the original python structure sent by the publisher.

        Note:
            The return value is memoized, use `_decode` to force
            re-evaluation.
        (Rt_decode(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pytdecode¶s		cC@s"t|j|j|jd|jƒS(NR(RRRRR(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyR6ÃscC@s
|jtkS(u1Set to true if the message has been acknowledged.(Rt
ACK_STATES(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyR)ÇscC@s|jr|jS|jƒS(uThe decoded message body.(RR7(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pytpayloadÌscC@s¾djt|ƒjt|ƒtd|jd|jd|jd|jdk	rZt
|jƒnddtd|jjdƒd	|jjd
ƒƒdtd|j
jd
ƒd|j
jdƒƒƒƒS(Nu)<{0} object at {1:#x} with details {2!r}>tstateRR
tbody_lengthRtcorrelation_iducorrelation_idttypeutypeRtexchangeuexchangetrouting_keyurouting_key(R*R=t__name__tidRRRR
RRtlenRRR(R((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyt__repr__Ñs			$N(u_stateuchanneludelivery_tagucontent_typeucontent_encodingu
delivery_infouheadersu
propertiesubodyu_decoded_cacheuacceptu__dict__(R@t
__module__t__doc__RRR
tIS_PYPYt	__slots__R"R%tFalseR-R1R4R3R2R7R6tpropertyR)R9RC(((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyR	s.					
	(REt
__future__RRRR!Rt
exceptionsRtfiveRRRt
serializationRtutils.functionalRt__all__R8thasattrRFtobjectR	(((sB/home/tvault/.virtenv/lib/python2.7/site-packages/kombu/message.pyt<module>s