repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
pyoceans/python-ctd
ctd/extras.py
barrier_layer_thickness
def barrier_layer_thickness(SA, CT): """ Compute the thickness of water separating the mixed surface layer from the thermocline. A more precise definition would be the difference between mixed layer depth (MLD) calculated from temperature minus the mixed layer depth calculated using density. """ import gsw sigma_theta = gsw.sigma0(SA, CT) mask = mixed_layer_depth(CT) mld = np.where(mask)[0][-1] sig_surface = sigma_theta[0] sig_bottom_mld = gsw.sigma0(SA[0], CT[mld]) d_sig_t = sig_surface - sig_bottom_mld d_sig = sigma_theta - sig_bottom_mld mask = d_sig < d_sig_t # Barrier layer. return Series(mask, index=SA.index, name="BLT")
python
def barrier_layer_thickness(SA, CT): """ Compute the thickness of water separating the mixed surface layer from the thermocline. A more precise definition would be the difference between mixed layer depth (MLD) calculated from temperature minus the mixed layer depth calculated using density. """ import gsw sigma_theta = gsw.sigma0(SA, CT) mask = mixed_layer_depth(CT) mld = np.where(mask)[0][-1] sig_surface = sigma_theta[0] sig_bottom_mld = gsw.sigma0(SA[0], CT[mld]) d_sig_t = sig_surface - sig_bottom_mld d_sig = sigma_theta - sig_bottom_mld mask = d_sig < d_sig_t # Barrier layer. return Series(mask, index=SA.index, name="BLT")
[ "def", "barrier_layer_thickness", "(", "SA", ",", "CT", ")", ":", "import", "gsw", "sigma_theta", "=", "gsw", ".", "sigma0", "(", "SA", ",", "CT", ")", "mask", "=", "mixed_layer_depth", "(", "CT", ")", "mld", "=", "np", ".", "where", "(", "mask", ")", "[", "0", "]", "[", "-", "1", "]", "sig_surface", "=", "sigma_theta", "[", "0", "]", "sig_bottom_mld", "=", "gsw", ".", "sigma0", "(", "SA", "[", "0", "]", ",", "CT", "[", "mld", "]", ")", "d_sig_t", "=", "sig_surface", "-", "sig_bottom_mld", "d_sig", "=", "sigma_theta", "-", "sig_bottom_mld", "mask", "=", "d_sig", "<", "d_sig_t", "# Barrier layer.", "return", "Series", "(", "mask", ",", "index", "=", "SA", ".", "index", ",", "name", "=", "\"BLT\"", ")" ]
Compute the thickness of water separating the mixed surface layer from the thermocline. A more precise definition would be the difference between mixed layer depth (MLD) calculated from temperature minus the mixed layer depth calculated using density.
[ "Compute", "the", "thickness", "of", "water", "separating", "the", "mixed", "surface", "layer", "from", "the", "thermocline", ".", "A", "more", "precise", "definition", "would", "be", "the", "difference", "between", "mixed", "layer", "depth", "(", "MLD", ")", "calculated", "from", "temperature", "minus", "the", "mixed", "layer", "depth", "calculated", "using", "density", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/extras.py#L271-L289
train
Compute the thickness of water separating the mixed surface layer from the thermocline.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4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1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(54) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b110000 + 0o77) + chr(0b1111 + 0o44) + chr(0b110110) + chr(400 - 346), 0b1000), nzTpIcepk0o8('\060' + chr(2808 - 2697) + chr(1034 - 983) + '\062' + chr(51), 0o10), nzTpIcepk0o8(chr(1690 - 1642) + '\x6f' + chr(1603 - 1548), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x36' + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\x32' + chr(1151 - 1101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\x36' + '\x36', 8), nzTpIcepk0o8(chr(1920 - 1872) + '\157' + chr(0b10101 + 0o35) + '\064' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1995 - 1947) + '\x6f' + chr(0b110110) + chr(0b100101 + 0o22), 0o10), nzTpIcepk0o8(chr(1623 - 1575) + chr(7780 - 7669) + '\x33' + '\x37', 25493 - 25485), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + chr(905 - 855) + chr(0b11100 + 0o24) + chr(1127 - 1079), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(48) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + '\x33' + chr(240 - 192) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\066' + chr(0b11110 + 0o27), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(937 - 886) + chr(0b100100 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b110010) + chr(54), 3631 - 3623), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b0 + 0o60), 26026 - 26018), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + '\x31' + '\066' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(377 - 329) + '\x36', 0o10), nzTpIcepk0o8(chr(1118 - 1070) + chr(0b1101001 + 0o6) + chr(0b110100) + '\060', 8806 - 8798), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\063' + chr(362 - 313) + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + '\x34' + chr(0b11010 + 0o26), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1001 + 0o50) + '\060' + chr(1587 - 1536), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(2049 - 1998) + chr(0b110101) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1000100 + 0o53) + chr(67 - 17) + chr(0b10010 + 0o37) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(0b110010) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + '\062' + '\x32' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(1124 - 1013) + '\063' + chr(52) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(2274 - 2219) + chr(1366 - 1316), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(0b10101 + 0o36) + chr(0b110101) + chr(0b1110 + 0o51), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(53) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b100111 + 0o12) + chr(1838 - 1785) + chr(0b10010 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(1962 - 1914) + chr(0b1011010 + 0o25) + chr(1011 - 961) + '\064' + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(3134 - 3023) + chr(55) + chr(0b10110 + 0o41), 50272 - 50264), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1010 + 0o50) + chr(0b110010) + chr(2005 - 1953), ord("\x08")), nzTpIcepk0o8(chr(1672 - 1624) + '\157' + '\x32' + chr(0b11110 + 0o30) + chr(0b110111), 56243 - 56235), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b110110) + chr(0b110010 + 0o4), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(50) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(401 - 353) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(50) + chr(0b110010) + chr(0b110100), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(0b1100 + 0o51) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1d'), chr(0b110101 + 0o57) + chr(0b1100101) + '\143' + '\x6f' + chr(0b111000 + 0o54) + chr(101))('\165' + '\x74' + chr(3262 - 3160) + chr(1988 - 1943) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def RiPUfyfxlL6j(GTC5vOnlRaBK, E19Ef2z80aHn): (ePt_De7KuBdt,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'T\x85\xa4'), '\x64' + chr(0b1100101) + chr(0b1111 + 0o124) + '\x6f' + chr(2019 - 1919) + '\x65')('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(56))),) LKQsw4r9wNc9 = ePt_De7KuBdt.sigma0(GTC5vOnlRaBK, E19Ef2z80aHn) BBM8dxm7YWge = WHoFGXqFF4xq(E19Ef2z80aHn) KkT3hBIe7ncV = nDF4gVNx0u9Q.xWH4M7K6Qbd3(BBM8dxm7YWge)[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110000), 0b1000)][-nzTpIcepk0o8(chr(48) + chr(111) + '\x31', 0o10)] zgnZ0s1YaGPI = LKQsw4r9wNc9[nzTpIcepk0o8(chr(799 - 751) + chr(0b100110 + 0o111) + chr(342 - 294), 8)] paBd4p9Ef_rV = ePt_De7KuBdt.sigma0(GTC5vOnlRaBK[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11100 + 0o24), 8)], E19Ef2z80aHn[KkT3hBIe7ncV]) mORgdY3W945L = zgnZ0s1YaGPI - paBd4p9Ef_rV PgrqVwRp3Kjv = LKQsw4r9wNc9 - paBd4p9Ef_rV BBM8dxm7YWge = PgrqVwRp3Kjv < mORgdY3W945L return vRdAbkVN2PxC(BBM8dxm7YWge, index=roI3spqORKae(GTC5vOnlRaBK, roI3spqORKae(ES5oEprVxulp(b'i\x86\xb5I\xc7\xe6\xa5\xedVE\xfa"'), '\144' + '\x65' + chr(99) + chr(111) + chr(0b1100100) + chr(1508 - 1407))(chr(0b1100000 + 0o25) + chr(1751 - 1635) + chr(4479 - 4377) + chr(174 - 129) + chr(2326 - 2270))), name=roI3spqORKae(ES5oEprVxulp(b'q\xba\x87'), chr(0b100000 + 0o104) + chr(6939 - 6838) + chr(0b1100011) + chr(0b1001101 + 0o42) + chr(9567 - 9467) + chr(0b1100100 + 0o1))(chr(0b111010 + 0o73) + chr(9761 - 9645) + chr(0b100110 + 0o100) + '\055' + chr(2486 - 2430)))
pyoceans/python-ctd
ctd/plotting.py
plot_cast
def plot_cast(df, secondary_y=False, label=None, *args, **kwargs): """ Plot a CTD variable with the index in the y-axis instead of x-axis. """ ax = kwargs.pop("ax", None) fignums = plt.get_fignums() if ax is None and not fignums: ax = plt.axes() fig = ax.get_figure() fig.set_size_inches((5.25, 6.75)) else: ax = plt.gca() fig = plt.gcf() figsize = kwargs.pop("figsize", fig.get_size_inches()) fig.set_size_inches(figsize) y_inverted = False if not getattr(ax, "y_inverted", False): setattr(ax, "y_inverted", True) y_inverted = True if secondary_y: ax = ax.twiny() xlabel = getattr(df, "name", None) ylabel = getattr(df.index, "name", None) if isinstance(df, pd.DataFrame): labels = label if label else df.columns for k, (col, series) in enumerate(df.iteritems()): ax.plot(series, series.index, label=labels[k]) elif isinstance(df, pd.Series): label = label if label else str(df.name) ax.plot(df.values, df.index, label=label, *args, **kwargs) ax.set_ylabel(ylabel) ax.set_xlabel(xlabel) if y_inverted and not secondary_y: ax.invert_yaxis() return ax
python
def plot_cast(df, secondary_y=False, label=None, *args, **kwargs): """ Plot a CTD variable with the index in the y-axis instead of x-axis. """ ax = kwargs.pop("ax", None) fignums = plt.get_fignums() if ax is None and not fignums: ax = plt.axes() fig = ax.get_figure() fig.set_size_inches((5.25, 6.75)) else: ax = plt.gca() fig = plt.gcf() figsize = kwargs.pop("figsize", fig.get_size_inches()) fig.set_size_inches(figsize) y_inverted = False if not getattr(ax, "y_inverted", False): setattr(ax, "y_inverted", True) y_inverted = True if secondary_y: ax = ax.twiny() xlabel = getattr(df, "name", None) ylabel = getattr(df.index, "name", None) if isinstance(df, pd.DataFrame): labels = label if label else df.columns for k, (col, series) in enumerate(df.iteritems()): ax.plot(series, series.index, label=labels[k]) elif isinstance(df, pd.Series): label = label if label else str(df.name) ax.plot(df.values, df.index, label=label, *args, **kwargs) ax.set_ylabel(ylabel) ax.set_xlabel(xlabel) if y_inverted and not secondary_y: ax.invert_yaxis() return ax
[ "def", "plot_cast", "(", "df", ",", "secondary_y", "=", "False", ",", "label", "=", "None", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "ax", "=", "kwargs", ".", "pop", "(", "\"ax\"", ",", "None", ")", "fignums", "=", "plt", ".", "get_fignums", "(", ")", "if", "ax", "is", "None", "and", "not", "fignums", ":", "ax", "=", "plt", ".", "axes", "(", ")", "fig", "=", "ax", ".", "get_figure", "(", ")", "fig", ".", "set_size_inches", "(", "(", "5.25", ",", "6.75", ")", ")", "else", ":", "ax", "=", "plt", ".", "gca", "(", ")", "fig", "=", "plt", ".", "gcf", "(", ")", "figsize", "=", "kwargs", ".", "pop", "(", "\"figsize\"", ",", "fig", ".", "get_size_inches", "(", ")", ")", "fig", ".", "set_size_inches", "(", "figsize", ")", "y_inverted", "=", "False", "if", "not", "getattr", "(", "ax", ",", "\"y_inverted\"", ",", "False", ")", ":", "setattr", "(", "ax", ",", "\"y_inverted\"", ",", "True", ")", "y_inverted", "=", "True", "if", "secondary_y", ":", "ax", "=", "ax", ".", "twiny", "(", ")", "xlabel", "=", "getattr", "(", "df", ",", "\"name\"", ",", "None", ")", "ylabel", "=", "getattr", "(", "df", ".", "index", ",", "\"name\"", ",", "None", ")", "if", "isinstance", "(", "df", ",", "pd", ".", "DataFrame", ")", ":", "labels", "=", "label", "if", "label", "else", "df", ".", "columns", "for", "k", ",", "(", "col", ",", "series", ")", "in", "enumerate", "(", "df", ".", "iteritems", "(", ")", ")", ":", "ax", ".", "plot", "(", "series", ",", "series", ".", "index", ",", "label", "=", "labels", "[", "k", "]", ")", "elif", "isinstance", "(", "df", ",", "pd", ".", "Series", ")", ":", "label", "=", "label", "if", "label", "else", "str", "(", "df", ".", "name", ")", "ax", ".", "plot", "(", "df", ".", "values", ",", "df", ".", "index", ",", "label", "=", "label", ",", "*", "args", ",", "*", "*", "kwargs", ")", "ax", ".", "set_ylabel", "(", "ylabel", ")", "ax", ".", "set_xlabel", "(", "xlabel", ")", "if", "y_inverted", "and", "not", "secondary_y", ":", "ax", ".", "invert_yaxis", "(", ")", "return", "ax" ]
Plot a CTD variable with the index in the y-axis instead of x-axis.
[ "Plot", "a", "CTD", "variable", "with", "the", "index", "in", "the", "y", "-", "axis", "instead", "of", "x", "-", "axis", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/plotting.py#L8-L50
train
Plot a CTD variable with the index in the y - axis instead of x - axis.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq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VP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(48) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + '\x34' + '\x31', 0o10), nzTpIcepk0o8(chr(2127 - 2079) + chr(0b1101111) + '\x31' + chr(49) + chr(0b110001 + 0o4), 41930 - 41922), nzTpIcepk0o8('\060' + chr(111) + chr(0b100101 + 0o15) + chr(0b101000 + 0o10), 0b1000), nzTpIcepk0o8(chr(2148 - 2100) + chr(0b1101111) + chr(0b1011 + 0o50) + '\x35' + '\061', ord("\x08")), nzTpIcepk0o8(chr(1015 - 967) + '\157' + '\061' + chr(0b101001 + 0o13) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\x36', 17908 - 17900), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110101) + chr(0b110101), 5460 - 5452), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + '\x33' + chr(54) + '\060', 0o10), nzTpIcepk0o8(chr(667 - 619) + chr(0b1101111) + chr(0b110001) + chr(0b11010 + 0o30) + chr(758 - 710), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b10000 + 0o45) + chr(1857 - 1805), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(1622 - 1573) + chr(2274 - 2224) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(765 - 717) + chr(0b1010001 + 0o36) + chr(0b1 + 0o62) + chr(650 - 595) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100001 + 0o22) + chr(0b110101) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(675 - 625) + chr(0b101011 + 0o11), 26212 - 26204), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2281 - 2230) + chr(0b100 + 0o54) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\x35' + chr(0b100101 + 0o16), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10602 - 10491) + chr(1850 - 1799) + chr(0b110000) + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(1914 - 1865) + '\062' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(3300 - 3189) + chr(687 - 637) + '\x31' + '\x32', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + '\064' + chr(568 - 520), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(9015 - 8904) + chr(50) + '\067' + chr(50), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\061' + chr(311 - 262) + chr(1553 - 1505), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(2597 - 2544), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(2867 - 2813) + '\063', 3562 - 3554), nzTpIcepk0o8('\060' + '\157' + chr(1068 - 1019) + chr(54) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(49) + chr(2311 - 2257) + chr(0b10110 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(234 - 186) + '\x6f' + '\062' + chr(0b10010 + 0o40), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(991 - 941) + chr(0b11101 + 0o23) + chr(1674 - 1621), 19687 - 19679), nzTpIcepk0o8('\x30' + '\x6f' + chr(626 - 571) + '\064', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\x31' + '\065', 8), nzTpIcepk0o8('\x30' + chr(0b1010000 + 0o37) + '\067', 0o10), nzTpIcepk0o8(chr(1128 - 1080) + chr(0b1101111) + chr(0b10011 + 0o36) + chr(53) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(560 - 512) + chr(0b1001101 + 0o42) + '\063' + '\064' + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110110) + chr(968 - 919), ord("\x08")), nzTpIcepk0o8(chr(1074 - 1026) + chr(111) + chr(2483 - 2433) + chr(1413 - 1359), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(1373 - 1322) + chr(1458 - 1404) + chr(48), 8), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(2017 - 1968) + chr(0b110001) + chr(239 - 188), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1001111 + 0o40) + chr(52) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(6619 - 6508) + chr(50) + chr(0b100110 + 0o21), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(889 - 841) + '\157' + chr(0b110001 + 0o4) + chr(0b101110 + 0o2), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa8'), '\x64' + chr(101) + '\x63' + '\x6f' + '\144' + '\x65')('\165' + chr(0b101101 + 0o107) + chr(0b101111 + 0o67) + chr(0b101100 + 0o1) + chr(0b100100 + 0o24)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ty2iBOOWiRKk(jpOn8DNZxbbx, qmxnm6GPfNf0=nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + '\x30', 0o10), OkDIn6t2Cke6=None, *eemPYp2vtTSr, **q5n0sHDDTy90): ZtB7KOLCW2Hk = q5n0sHDDTy90.uC_Yoybx7J0I(roI3spqORKae(ES5oEprVxulp(b'\xe7Y'), '\144' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(6113 - 6013) + chr(0b100000 + 0o105))(chr(117) + '\x74' + '\146' + chr(0b101101) + chr(0b10001 + 0o47)), None) GYAHmZGoDYLR = Z7HGgmIyegqz.get_fignums() if ZtB7KOLCW2Hk is None and (not GYAHmZGoDYLR): ZtB7KOLCW2Hk = Z7HGgmIyegqz.kMBz145toiBz() ux0XlXMUdKbX = ZtB7KOLCW2Hk.get_figure() roI3spqORKae(ux0XlXMUdKbX, roI3spqORKae(ES5oEprVxulp(b'\xf5D9O\x9a\x0fd\x88\xaf9\xc22\x96\x8eg'), '\144' + '\145' + chr(0b100000 + 0o103) + '\157' + '\x64' + chr(0b100000 + 0o105))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(388 - 343) + '\x38'))((5.25, 6.75)) else: ZtB7KOLCW2Hk = Z7HGgmIyegqz.RloBOY1J4XEQ() ux0XlXMUdKbX = Z7HGgmIyegqz.gcf() VEZvNXPcxjY7 = q5n0sHDDTy90.uC_Yoybx7J0I(roI3spqORKae(ES5oEprVxulp(b'\xe0H*c\x80\x1c{'), chr(1313 - 1213) + '\145' + chr(99) + chr(0b101000 + 0o107) + chr(0b1100100) + chr(0b10000 + 0o125))('\x75' + '\x74' + chr(0b1011010 + 0o14) + chr(0b101101) + chr(2984 - 2928)), ux0XlXMUdKbX.get_size_inches()) roI3spqORKae(ux0XlXMUdKbX, roI3spqORKae(ES5oEprVxulp(b'\xf5D9O\x9a\x0fd\x88\xaf9\xc22\x96\x8eg'), chr(1199 - 1099) + '\x65' + chr(0b1100011) + chr(0b101 + 0o152) + chr(0b1100100) + chr(0b1100101))(chr(0b111101 + 0o70) + '\164' + chr(102) + chr(45) + chr(0b111000)))(VEZvNXPcxjY7) m462aXqgrMZx = nzTpIcepk0o8(chr(937 - 889) + '\157' + chr(48), 8) if not roI3spqORKae(ZtB7KOLCW2Hk, roI3spqORKae(ES5oEprVxulp(b'\xff~$~\x9f\x03l\x99\x954'), chr(0b1100100) + chr(0b100101 + 0o100) + '\x63' + '\157' + chr(100) + chr(0b110 + 0o137))('\165' + '\164' + chr(0b111001 + 0o55) + chr(365 - 320) + chr(0b101101 + 0o13)), nzTpIcepk0o8('\x30' + '\x6f' + '\060', 8)): lCf1uzpaIUMv(ZtB7KOLCW2Hk, roI3spqORKae(ES5oEprVxulp(b'\xff~$~\x9f\x03l\x99\x954'), chr(0b1100100) + chr(10086 - 9985) + chr(0b0 + 0o143) + '\x6f' + chr(0b1100100) + '\145')(chr(117) + chr(116) + chr(102) + '\x2d' + chr(0b111000)), nzTpIcepk0o8(chr(756 - 708) + chr(0b1101111) + chr(2274 - 2225), 0o10)) m462aXqgrMZx = nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001), 8) if qmxnm6GPfNf0: ZtB7KOLCW2Hk = ZtB7KOLCW2Hk.twiny() ZVYT6Xl1DQe0 = roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\xe8@ u'), '\144' + chr(101) + '\x63' + '\x6f' + chr(100) + chr(0b101110 + 0o67))(chr(11478 - 11361) + chr(5966 - 5850) + chr(0b10011 + 0o123) + '\055' + '\070'), None) p9J2mQ92i8D9 = roI3spqORKae(jpOn8DNZxbbx.ZpfN5tSLaZze, roI3spqORKae(ES5oEprVxulp(b'\xe8@ u'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(6460 - 6360) + '\x65')(chr(0b1110101) + '\x74' + chr(0b101101 + 0o71) + '\x2d' + chr(56)), None) if suIjIS24Zkqw(jpOn8DNZxbbx, roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\xc2@9q\xaf\x14\x7f\x80\x95'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\x64' + chr(101))('\x75' + '\x74' + chr(7483 - 7381) + chr(0b1010 + 0o43) + chr(0b111000)))): Ar0km3TBAurm = OkDIn6t2Cke6 if OkDIn6t2Cke6 else jpOn8DNZxbbx.U39jSiI54Mlp for (B6UAF1zReOyJ, (hRTUxJgvuslu, TwsKAaNb6gxd)) in _kV_Bomx8PZ4(roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\xf2B\x1e{\x83\x05l\xa1\x9b#\xc7`'), chr(6675 - 6575) + '\x65' + chr(4433 - 4334) + '\157' + '\144' + '\x65')(chr(0b110001 + 0o104) + '\x74' + chr(7290 - 7188) + '\x2d' + chr(0b1100 + 0o54)))()): roI3spqORKae(ZtB7KOLCW2Hk, roI3spqORKae(ES5oEprVxulp(b'\xf6M"d'), chr(0b1100100) + chr(3672 - 3571) + chr(99) + chr(10477 - 10366) + chr(0b1110 + 0o126) + chr(1266 - 1165))(chr(0b1101010 + 0o13) + chr(0b1110100) + chr(3935 - 3833) + chr(58 - 13) + chr(56)))(TwsKAaNb6gxd, roI3spqORKae(TwsKAaNb6gxd, roI3spqORKae(ES5oEprVxulp(b'\xdcQ+^\xdc\x12M\xa1\x91\n\xd64'), '\x64' + '\x65' + chr(0b111100 + 0o47) + '\157' + '\x64' + chr(0b1100101))(chr(0b11011 + 0o132) + chr(116) + chr(102) + '\x2d' + '\070')), label=Ar0km3TBAurm[B6UAF1zReOyJ]) elif suIjIS24Zkqw(jpOn8DNZxbbx, roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\xd5D?y\x8c\x15'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(4700 - 4589) + chr(9926 - 9826) + chr(101))(chr(117) + '\x74' + chr(4329 - 4227) + chr(45) + '\070'))): OkDIn6t2Cke6 = OkDIn6t2Cke6 if OkDIn6t2Cke6 else N9zlRy29S1SS(jpOn8DNZxbbx.SLVB2BPA_mIe) roI3spqORKae(ZtB7KOLCW2Hk, roI3spqORKae(ES5oEprVxulp(b'\xf6M"d'), chr(3764 - 3664) + chr(5011 - 4910) + chr(0b10101 + 0o116) + '\x6f' + chr(0b1100100) + '\145')(chr(10083 - 9966) + chr(11004 - 10888) + chr(102) + chr(1376 - 1331) + chr(283 - 227)))(roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\xc5R"t\xb3,V\xdb\x88i\xf8)'), chr(0b1100100) + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1011110 + 0o27) + chr(0b101 + 0o157) + chr(102) + chr(45) + '\070')), roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\xdcQ+^\xdc\x12M\xa1\x91\n\xd64'), chr(0b111 + 0o135) + '\145' + chr(6283 - 6184) + chr(0b100011 + 0o114) + chr(7675 - 7575) + chr(101))(chr(11407 - 11290) + '\164' + '\x66' + '\055' + chr(0b111000))), *eemPYp2vtTSr, label=OkDIn6t2Cke6, **q5n0sHDDTy90) roI3spqORKae(ZtB7KOLCW2Hk, roI3spqORKae(ES5oEprVxulp(b'\xf5D9O\x90\n\x7f\x8f\x95<'), chr(0b1100100) + chr(101) + chr(99) + '\157' + chr(4859 - 4759) + chr(101))('\165' + '\164' + '\x66' + chr(0b11111 + 0o16) + '\x38'))(p9J2mQ92i8D9) roI3spqORKae(ZtB7KOLCW2Hk, roI3spqORKae(ES5oEprVxulp(b'\xf5D9O\x91\n\x7f\x8f\x95<'), '\144' + '\145' + '\x63' + chr(111) + '\144' + chr(101))('\x75' + chr(0b1110100) + chr(102) + chr(0b0 + 0o55) + '\x38'))(ZVYT6Xl1DQe0) if m462aXqgrMZx and (not qmxnm6GPfNf0): roI3spqORKae(ZtB7KOLCW2Hk, roI3spqORKae(ES5oEprVxulp(b'\xefO;u\x9b\x12A\x94\x91(\xc5"'), chr(0b1100100) + '\145' + chr(0b11100 + 0o107) + '\157' + chr(2831 - 2731) + chr(101))(chr(117) + chr(10127 - 10011) + chr(3397 - 3295) + chr(1126 - 1081) + chr(0b111000)))() return ZtB7KOLCW2Hk
pyoceans/python-ctd
ctd/processing.py
_rolling_window
def _rolling_window(data, block): """ http://stackoverflow.com/questions/4936620/ Using strides for an efficient moving average filter. """ shape = data.shape[:-1] + (data.shape[-1] - block + 1, block) strides = data.strides + (data.strides[-1],) return np.lib.stride_tricks.as_strided(data, shape=shape, strides=strides)
python
def _rolling_window(data, block): """ http://stackoverflow.com/questions/4936620/ Using strides for an efficient moving average filter. """ shape = data.shape[:-1] + (data.shape[-1] - block + 1, block) strides = data.strides + (data.strides[-1],) return np.lib.stride_tricks.as_strided(data, shape=shape, strides=strides)
[ "def", "_rolling_window", "(", "data", ",", "block", ")", ":", "shape", "=", "data", ".", "shape", "[", ":", "-", "1", "]", "+", "(", "data", ".", "shape", "[", "-", "1", "]", "-", "block", "+", "1", ",", "block", ")", "strides", "=", "data", ".", "strides", "+", "(", "data", ".", "strides", "[", "-", "1", "]", ",", ")", "return", "np", ".", "lib", ".", "stride_tricks", ".", "as_strided", "(", "data", ",", "shape", "=", "shape", ",", "strides", "=", "strides", ")" ]
http://stackoverflow.com/questions/4936620/ Using strides for an efficient moving average filter.
[ "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "4936620", "/", "Using", "strides", "for", "an", "efficient", "moving", "average", "filter", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L7-L15
train
A rolling window of the given block of data.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5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MnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b110010) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(0b110001) + chr(53) + chr(3018 - 2963), 0b1000), nzTpIcepk0o8(chr(626 - 578) + chr(111) + chr(0b110011) + '\061' + chr(481 - 433), ord("\x08")), nzTpIcepk0o8('\x30' + chr(6941 - 6830) + chr(0b100100 + 0o15) + chr(0b11110 + 0o23), 59797 - 59789), nzTpIcepk0o8('\x30' + '\x6f' + chr(2231 - 2180) + '\066', 58414 - 58406), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(0b110100) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(2006 - 1958) + chr(0b1101111) + chr(0b1101 + 0o44) + chr(0b110101) + chr(0b100001 + 0o17), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(586 - 534) + '\062', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b101000 + 0o10), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(816 - 766) + '\062' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11001 + 0o126) + '\063' + chr(0b110000) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(241 - 130) + '\064' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100000 + 0o17) + '\x33' + '\x32' + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + '\x33' + '\067' + '\060', 15794 - 15786), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b101100 + 0o7) + '\065' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b110100) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b101011 + 0o11), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + '\062' + chr(1336 - 1281) + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\066' + chr(2292 - 2238), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + '\062' + chr(0b100101 + 0o13) + chr(48), 12198 - 12190), nzTpIcepk0o8(chr(1521 - 1473) + chr(111) + '\x32' + '\067' + '\065', 12201 - 12193), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(3214 - 3103) + chr(50) + chr(48) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(2256 - 2208) + '\x6f' + chr(0b10010 + 0o37) + chr(0b11100 + 0o30) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(896 - 846) + chr(49) + '\066', 36390 - 36382), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1001001 + 0o46) + '\x32' + chr(659 - 606) + chr(744 - 691), ord("\x08")), nzTpIcepk0o8(chr(1167 - 1119) + chr(0b1000001 + 0o56) + chr(2775 - 2721) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(0b110010) + '\x30' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110000) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(53) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\x34', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(0b110011) + '\x36' + '\067', 0o10), nzTpIcepk0o8(chr(1081 - 1033) + chr(0b1101111) + chr(0b111 + 0o52) + chr(2102 - 2054) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(1500 - 1445) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101101 + 0o2) + chr(51) + '\x34', 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(50) + chr(0b110110) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b11011 + 0o124) + chr(2096 - 2045) + '\060' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8968 - 8857) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b10101 + 0o34) + '\063', 8734 - 8726), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + '\x31' + chr(0b11101 + 0o27) + chr(1860 - 1806), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2036 - 1925) + chr(294 - 245) + chr(51) + chr(0b110111 + 0o0), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(9244 - 9133) + chr(53) + chr(48), 50945 - 50937)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'y'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(6162 - 6051) + chr(100) + '\x65')(chr(0b1101100 + 0o11) + chr(10669 - 10553) + '\146' + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def OCf545NJtUVj(FfKOThdpoDTb, TvT0D2rIGW5A): lhbM092AFW8f = FfKOThdpoDTb.lhbM092AFW8f[:-nzTpIcepk0o8(chr(1776 - 1728) + chr(0b1010101 + 0o32) + chr(0b100011 + 0o16), 8)] + (FfKOThdpoDTb.lhbM092AFW8f[-nzTpIcepk0o8(chr(1192 - 1144) + chr(10814 - 10703) + chr(2143 - 2094), 8)] - TvT0D2rIGW5A + nzTpIcepk0o8('\x30' + chr(0b100000 + 0o117) + chr(0b11010 + 0o27), 8), TvT0D2rIGW5A) bkvSfGFi2cL4 = FfKOThdpoDTb.strides + (FfKOThdpoDTb.strides[-nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + '\061', 8)],) return roI3spqORKae(nDF4gVNx0u9Q.lib.stride_tricks, roI3spqORKae(ES5oEprVxulp(b'6\x1c\x97zj\xd3\x01\xc6u\xf7'), chr(0b1100100) + '\145' + chr(0b1010100 + 0o17) + '\157' + chr(1310 - 1210) + chr(101))(chr(0b1110101) + '\164' + chr(102) + chr(0b11110 + 0o17) + chr(0b1 + 0o67)))(FfKOThdpoDTb, shape=lhbM092AFW8f, strides=bkvSfGFi2cL4)
pyoceans/python-ctd
ctd/processing.py
split
def split(df): """Returns a tuple with down/up-cast.""" idx = df.index.argmax() + 1 down = df.iloc[:idx] # Reverse index to orient it as a CTD cast. up = df.iloc[idx:][::-1] return down, up
python
def split(df): """Returns a tuple with down/up-cast.""" idx = df.index.argmax() + 1 down = df.iloc[:idx] # Reverse index to orient it as a CTD cast. up = df.iloc[idx:][::-1] return down, up
[ "def", "split", "(", "df", ")", ":", "idx", "=", "df", ".", "index", ".", "argmax", "(", ")", "+", "1", "down", "=", "df", ".", "iloc", "[", ":", "idx", "]", "# Reverse index to orient it as a CTD cast.", "up", "=", "df", ".", "iloc", "[", "idx", ":", "]", "[", ":", ":", "-", "1", "]", "return", "down", ",", "up" ]
Returns a tuple with down/up-cast.
[ "Returns", "a", "tuple", "with", "down", "/", "up", "-", "cast", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L27-L33
train
Returns a tuple with down and up - cast.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTw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ygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b11 + 0o57) + chr(0b110001), 41867 - 41859), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\x30' + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(49) + '\x31', 54154 - 54146), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(5199 - 5088) + '\x31' + chr(0b110101) + chr(0b110111), 50094 - 50086), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(425 - 376) + chr(2438 - 2386) + chr(2804 - 2751), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2156 - 2105) + chr(48) + chr(449 - 399), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10000 + 0o137) + '\x31' + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\x31' + chr(0b110010), 24355 - 24347), nzTpIcepk0o8('\060' + chr(111) + chr(0b100111 + 0o12) + chr(53) + '\061', 26667 - 26659), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110110) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\x32' + chr(53), 57453 - 57445), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101011 + 0o6) + '\062' + chr(0b110111), 28541 - 28533), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + '\061' + '\067' + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b110100) + chr(53), 20106 - 20098), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(51) + chr(52) + chr(0b110100), 17269 - 17261), nzTpIcepk0o8('\x30' + '\157' + chr(2190 - 2141) + chr(1073 - 1018) + chr(0b1011 + 0o54), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + '\063' + chr(53) + '\061', 14656 - 14648), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(282 - 227) + chr(0b100000 + 0o22), 15134 - 15126), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b1101 + 0o52) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(777 - 726) + chr(0b100110 + 0o16) + chr(0b10101 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(49) + chr(0b100010 + 0o21) + chr(0b110100), 49201 - 49193), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(52) + chr(0b11010 + 0o31), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b110101) + '\x35', 0o10), nzTpIcepk0o8(chr(1637 - 1589) + chr(111) + '\063' + chr(0b110001) + chr(0b101100 + 0o5), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(0b110011) + chr(49) + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(6889 - 6778) + chr(617 - 566) + chr(2326 - 2274) + '\065', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(1920 - 1869) + chr(0b1101 + 0o43) + '\061', 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(49), 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1010011 + 0o34) + '\064' + '\x36', 40732 - 40724), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(2912 - 2801) + '\063' + chr(0b110010) + '\061', 8), nzTpIcepk0o8(chr(640 - 592) + '\157' + chr(2051 - 1997) + chr(798 - 748), 28111 - 28103), nzTpIcepk0o8(chr(1076 - 1028) + chr(6708 - 6597) + chr(0b110010) + '\061' + chr(0b101010 + 0o6), 31353 - 31345), nzTpIcepk0o8('\x30' + chr(0b111010 + 0o65) + '\x33' + chr(0b101011 + 0o14) + chr(0b1 + 0o64), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(3960 - 3849) + chr(49) + chr(48) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x31' + chr(1747 - 1696), 7677 - 7669), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11100 + 0o31) + chr(0b111 + 0o54), 22034 - 22026)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + '\065' + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xff'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\157' + '\144' + chr(101))('\165' + chr(749 - 633) + chr(0b1100110) + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def LfRrQOxuDvnC(jpOn8DNZxbbx): At3kbMoXzzmV = jpOn8DNZxbbx.index.qWXgHopo6E5J() + nzTpIcepk0o8('\060' + chr(12108 - 11997) + chr(49), 8) B2jLBDUbt1u2 = jpOn8DNZxbbx.mj4jMnYn3A2l[:At3kbMoXzzmV] NSH2ByM93RoN = jpOn8DNZxbbx.mj4jMnYn3A2l[At3kbMoXzzmV:][::-nzTpIcepk0o8(chr(568 - 520) + chr(0b1101111) + chr(49), 8)] return (B2jLBDUbt1u2, NSH2ByM93RoN)
pyoceans/python-ctd
ctd/processing.py
lp_filter
def lp_filter(df, sample_rate=24.0, time_constant=0.15): """ Filter a series with `time_constant` (use 0.15 s for pressure), and for a signal of `sample_rate` in Hertz (24 Hz for 911+). NOTE: 911+ systems do not require filter for temperature nor salinity. Examples -------- >>> from pathlib import Path >>> import matplotlib.pyplot as plt >>> import ctd >>> data_path = Path(__file__).parents[1].joinpath("tests", "data") >>> raw = ctd.from_cnv(data_path.joinpath('CTD-spiked-unfiltered.cnv.bz2')) >>> prc = ctd.from_cnv(data_path.joinpath('CTD-spiked-filtered.cnv.bz2')) >>> kw = {"sample_rate": 24.0, "time_constant": 0.15} >>> original = prc.index.values >>> unfiltered = raw.index.values >>> filtered = raw.lp_filter(**kw).index.values >>> fig, ax = plt.subplots() >>> l1, = ax.plot(original, 'k', label='original') >>> l2, = ax.plot(unfiltered, 'r', label='unfiltered') >>> l3, = ax.plot(filtered, 'g', label='filtered') >>> leg = ax.legend() Notes ----- https://scipy-cookbook.readthedocs.io/items/FIRFilter.html """ from scipy import signal # Butter is closer to what SBE is doing with their cosine filter. Wn = (1.0 / time_constant) / (sample_rate * 2.0) b, a = signal.butter(2, Wn, "low") new_df = df.copy() new_df.index = signal.filtfilt(b, a, df.index.values) return new_df
python
def lp_filter(df, sample_rate=24.0, time_constant=0.15): """ Filter a series with `time_constant` (use 0.15 s for pressure), and for a signal of `sample_rate` in Hertz (24 Hz for 911+). NOTE: 911+ systems do not require filter for temperature nor salinity. Examples -------- >>> from pathlib import Path >>> import matplotlib.pyplot as plt >>> import ctd >>> data_path = Path(__file__).parents[1].joinpath("tests", "data") >>> raw = ctd.from_cnv(data_path.joinpath('CTD-spiked-unfiltered.cnv.bz2')) >>> prc = ctd.from_cnv(data_path.joinpath('CTD-spiked-filtered.cnv.bz2')) >>> kw = {"sample_rate": 24.0, "time_constant": 0.15} >>> original = prc.index.values >>> unfiltered = raw.index.values >>> filtered = raw.lp_filter(**kw).index.values >>> fig, ax = plt.subplots() >>> l1, = ax.plot(original, 'k', label='original') >>> l2, = ax.plot(unfiltered, 'r', label='unfiltered') >>> l3, = ax.plot(filtered, 'g', label='filtered') >>> leg = ax.legend() Notes ----- https://scipy-cookbook.readthedocs.io/items/FIRFilter.html """ from scipy import signal # Butter is closer to what SBE is doing with their cosine filter. Wn = (1.0 / time_constant) / (sample_rate * 2.0) b, a = signal.butter(2, Wn, "low") new_df = df.copy() new_df.index = signal.filtfilt(b, a, df.index.values) return new_df
[ "def", "lp_filter", "(", "df", ",", "sample_rate", "=", "24.0", ",", "time_constant", "=", "0.15", ")", ":", "from", "scipy", "import", "signal", "# Butter is closer to what SBE is doing with their cosine filter.", "Wn", "=", "(", "1.0", "/", "time_constant", ")", "/", "(", "sample_rate", "*", "2.0", ")", "b", ",", "a", "=", "signal", ".", "butter", "(", "2", ",", "Wn", ",", "\"low\"", ")", "new_df", "=", "df", ".", "copy", "(", ")", "new_df", ".", "index", "=", "signal", ".", "filtfilt", "(", "b", ",", "a", ",", "df", ".", "index", ".", "values", ")", "return", "new_df" ]
Filter a series with `time_constant` (use 0.15 s for pressure), and for a signal of `sample_rate` in Hertz (24 Hz for 911+). NOTE: 911+ systems do not require filter for temperature nor salinity. Examples -------- >>> from pathlib import Path >>> import matplotlib.pyplot as plt >>> import ctd >>> data_path = Path(__file__).parents[1].joinpath("tests", "data") >>> raw = ctd.from_cnv(data_path.joinpath('CTD-spiked-unfiltered.cnv.bz2')) >>> prc = ctd.from_cnv(data_path.joinpath('CTD-spiked-filtered.cnv.bz2')) >>> kw = {"sample_rate": 24.0, "time_constant": 0.15} >>> original = prc.index.values >>> unfiltered = raw.index.values >>> filtered = raw.lp_filter(**kw).index.values >>> fig, ax = plt.subplots() >>> l1, = ax.plot(original, 'k', label='original') >>> l2, = ax.plot(unfiltered, 'r', label='unfiltered') >>> l3, = ax.plot(filtered, 'g', label='filtered') >>> leg = ax.legend() Notes ----- https://scipy-cookbook.readthedocs.io/items/FIRFilter.html
[ "Filter", "a", "series", "with", "time_constant", "(", "use", "0", ".", "15", "s", "for", "pressure", ")", "and", "for", "a", "signal", "of", "sample_rate", "in", "Hertz", "(", "24", "Hz", "for", "911", "+", ")", ".", "NOTE", ":", "911", "+", "systems", "do", "not", "require", "filter", "for", "temperature", "nor", "salinity", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L38-L75
train
Filter a series with time constant and for
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,Wdo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,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1010110 + 0o31) + chr(1551 - 1501) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b110101 + 0o72) + '\x33' + chr(0b110110) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1586 - 1535) + chr(48) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(832 - 781) + chr(0b110000) + chr(1772 - 1718), 0b1000), nzTpIcepk0o8(chr(546 - 498) + '\157' + chr(2200 - 2150) + '\064' + chr(0b1010 + 0o46), 0b1000), nzTpIcepk0o8('\x30' + chr(7779 - 7668) + chr(0b110011) + '\x37' + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(0b110110) + chr(61 - 9), 15654 - 15646), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b1100 + 0o44), 0o10), nzTpIcepk0o8('\x30' + chr(5912 - 5801) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(4941 - 4830) + '\062' + chr(2186 - 2133) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110100) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(54) + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(10750 - 10639) + chr(0b110001) + chr(0b101101 + 0o7) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(1423 - 1312) + chr(2276 - 2227) + chr(49) + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(2755 - 2701) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b101000 + 0o15), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\062' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b100010 + 0o22) + '\x31', 41778 - 41770), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b110010) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(55), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x31' + chr(0b110101 + 0o1), 0b1000), nzTpIcepk0o8(chr(431 - 383) + chr(0b1 + 0o156) + '\061' + chr(0b110110) + chr(219 - 164), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101 + 0o1) + chr(0b110010 + 0o0), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b1100 + 0o47) + chr(0b110001 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(502 - 391) + '\061' + '\062' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(55) + chr(858 - 808), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(53) + '\x34', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(2645 - 2590) + '\x36', 37840 - 37832), nzTpIcepk0o8(chr(518 - 470) + chr(4152 - 4041) + '\065' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(1436 - 1386) + '\060', 8), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(1558 - 1447) + chr(50) + chr(0b110100) + chr(2281 - 2232), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1476 - 1427) + chr(1471 - 1418) + chr(1426 - 1371), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(1106 - 1055) + chr(0b111 + 0o51), 39180 - 39172), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\064' + '\065', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(0b110001) + '\x36' + '\x31', 8), nzTpIcepk0o8('\060' + chr(9227 - 9116) + '\063' + chr(0b110111) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(10973 - 10862) + chr(1223 - 1172) + chr(1137 - 1084) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(9426 - 9315) + chr(0b110011) + '\060' + '\x36', 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b110010 + 0o75) + chr(50) + '\x31' + chr(48), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(0b110101) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'='), chr(9771 - 9671) + '\145' + '\x63' + '\157' + chr(100) + chr(0b1011011 + 0o12))(chr(0b1000101 + 0o60) + chr(0b1110100) + '\146' + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def duO99hvwz23F(jpOn8DNZxbbx, sHX5S4SkpPgB=24.0, wU90TmfaNYiJ=0.15): (bNAqtpGn_xJK,) = (roI3spqORKae(rFFUeiYWzOhx(roI3spqORKae(ES5oEprVxulp(b'`\x96\xac\xb6\xd9'), chr(8411 - 8311) + chr(0b111100 + 0o51) + '\x63' + chr(0b1101111) + chr(100) + chr(3023 - 2922))('\x75' + chr(0b1101010 + 0o12) + chr(0b1100110) + '\x2d' + chr(0b110011 + 0o5)), roI3spqORKae(ES5oEprVxulp(b'`\x9c\xa2\xa8\xc1\x95'), chr(100) + '\x65' + chr(99) + chr(111) + '\x64' + chr(4997 - 4896))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + chr(1107 - 1051))), roI3spqORKae(ES5oEprVxulp(b'`\x9c\xa2\xa8\xc1\x95'), chr(0b110011 + 0o61) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(1279 - 1234) + chr(0b10110 + 0o42))),) aQgdUGTN1ZjO = 1.0 / wU90TmfaNYiJ / (sHX5S4SkpPgB * 2.0) (xFDEVQn5qSdh, AQ9ceR9AaoT1) = bNAqtpGn_xJK.butter(nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(50), 8), aQgdUGTN1ZjO, roI3spqORKae(ES5oEprVxulp(b'\x7f\x9a\xb2'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(4766 - 4655) + '\144' + '\x65')(chr(3066 - 2949) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38')) nb1PCJiiJkkG = jpOn8DNZxbbx.copy() nb1PCJiiJkkG.ZpfN5tSLaZze = bNAqtpGn_xJK.filtfilt(xFDEVQn5qSdh, AQ9ceR9AaoT1, jpOn8DNZxbbx.index.CsodZJH6x9Tx) return nb1PCJiiJkkG
pyoceans/python-ctd
ctd/processing.py
press_check
def press_check(df): """ Remove pressure reversals from the index. """ new_df = df.copy() press = new_df.copy().index.values ref = press[0] inversions = np.diff(np.r_[press, press[-1]]) < 0 mask = np.zeros_like(inversions) for k, p in enumerate(inversions): if p: ref = press[k] cut = press[k + 1 :] < ref mask[k + 1 :][cut] = True new_df[mask] = np.NaN return new_df
python
def press_check(df): """ Remove pressure reversals from the index. """ new_df = df.copy() press = new_df.copy().index.values ref = press[0] inversions = np.diff(np.r_[press, press[-1]]) < 0 mask = np.zeros_like(inversions) for k, p in enumerate(inversions): if p: ref = press[k] cut = press[k + 1 :] < ref mask[k + 1 :][cut] = True new_df[mask] = np.NaN return new_df
[ "def", "press_check", "(", "df", ")", ":", "new_df", "=", "df", ".", "copy", "(", ")", "press", "=", "new_df", ".", "copy", "(", ")", ".", "index", ".", "values", "ref", "=", "press", "[", "0", "]", "inversions", "=", "np", ".", "diff", "(", "np", ".", "r_", "[", "press", ",", "press", "[", "-", "1", "]", "]", ")", "<", "0", "mask", "=", "np", ".", "zeros_like", "(", "inversions", ")", "for", "k", ",", "p", "in", "enumerate", "(", "inversions", ")", ":", "if", "p", ":", "ref", "=", "press", "[", "k", "]", "cut", "=", "press", "[", "k", "+", "1", ":", "]", "<", "ref", "mask", "[", "k", "+", "1", ":", "]", "[", "cut", "]", "=", "True", "new_df", "[", "mask", "]", "=", "np", ".", "NaN", "return", "new_df" ]
Remove pressure reversals from the index.
[ "Remove", "pressure", "reversals", "from", "the", "index", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L80-L97
train
Check that pressure reversals in the index are indeed in the correct order.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHl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4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b110111) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000000 + 0o57) + chr(50) + chr(49) + chr(53), 52030 - 52022), nzTpIcepk0o8(chr(555 - 507) + chr(4285 - 4174) + chr(51) + chr(0b100001 + 0o17) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\062' + chr(790 - 742) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(444 - 396) + chr(5544 - 5433) + chr(0b110001) + chr(1899 - 1851) + chr(51), 57541 - 57533), nzTpIcepk0o8(chr(54 - 6) + chr(11806 - 11695) + '\x33' + chr(0b110100) + chr(0b110000), 12168 - 12160), nzTpIcepk0o8(chr(1803 - 1755) + chr(0b1101111) + chr(51) + '\x35' + chr(2200 - 2146), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b110110) + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(9481 - 9370) + '\061' + chr(52), 29451 - 29443), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\064' + chr(0b110000), 32527 - 32519), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + chr(0b110010) + chr(50) + chr(1631 - 1581), 22896 - 22888), nzTpIcepk0o8(chr(2007 - 1959) + '\157' + '\x33' + '\064' + '\062', 44646 - 44638), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(887 - 837) + '\067' + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010111 + 0o30) + chr(585 - 534) + chr(314 - 265) + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101001 + 0o12) + '\x34' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(780 - 728) + chr(1298 - 1248), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110 + 0o57) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(529 - 480) + '\060' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + chr(51) + chr(0b101011 + 0o7) + '\x32', 0o10), nzTpIcepk0o8(chr(1372 - 1324) + chr(111) + '\x30', 34313 - 34305), nzTpIcepk0o8(chr(1908 - 1860) + '\x6f' + chr(0b100111 + 0o13) + '\x31' + chr(0b11110 + 0o23), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(990 - 941) + chr(51) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\060', 37573 - 37565), nzTpIcepk0o8(chr(48) + chr(11196 - 11085) + '\x37' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + '\063' + chr(0b110011) + chr(0b101111 + 0o2), 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + '\061' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001100 + 0o43) + '\062' + '\x37' + '\x34', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1681 - 1631) + chr(0b110110) + chr(0b10 + 0o56), 59991 - 59983), nzTpIcepk0o8(chr(48) + chr(1941 - 1830) + '\065' + chr(48), 16980 - 16972), nzTpIcepk0o8(chr(2151 - 2103) + '\x6f' + chr(179 - 130) + chr(0b110001 + 0o4) + '\063', 9532 - 9524), nzTpIcepk0o8(chr(2080 - 2032) + '\157' + chr(0b11000 + 0o37) + chr(50), 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b100110 + 0o15) + chr(50) + chr(0b1011 + 0o53), 2066 - 2058), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\065' + '\060', 52638 - 52630), nzTpIcepk0o8('\060' + chr(9357 - 9246) + '\063' + chr(0b110100) + chr(50), 8), nzTpIcepk0o8('\x30' + chr(11332 - 11221) + chr(0b10101 + 0o36) + '\x32', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\061' + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + chr(7062 - 6951) + '\x32' + chr(50) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b1101 + 0o52) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(1942 - 1894) + chr(0b1101111) + '\x33' + chr(2143 - 2093) + '\x31', 23594 - 23586), nzTpIcepk0o8(chr(1976 - 1928) + '\x6f' + chr(0b101101 + 0o4) + chr(0b110001) + chr(95 - 40), 55091 - 55083)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2201 - 2153) + chr(0b1101111) + '\065' + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd5'), '\x64' + '\145' + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(0b1000000 + 0o65) + chr(11628 - 11512) + chr(6628 - 6526) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def kqfzN5Gp8jLu(jpOn8DNZxbbx): nb1PCJiiJkkG = jpOn8DNZxbbx.copy() iYxGSEeEPM9b = nb1PCJiiJkkG.copy().index.CsodZJH6x9Tx CmNScfxJ1Uih = iYxGSEeEPM9b[nzTpIcepk0o8(chr(953 - 905) + chr(0b1001100 + 0o43) + chr(394 - 346), 8)] lbjmTxQKtuBd = nDF4gVNx0u9Q.H5XQ4iF_jpSm(nDF4gVNx0u9Q.r_[iYxGSEeEPM9b, iYxGSEeEPM9b[-nzTpIcepk0o8('\060' + chr(2607 - 2496) + chr(0b11110 + 0o23), 46503 - 46495)]]) < nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8) BBM8dxm7YWge = nDF4gVNx0u9Q.KbvDBsY5V5bS(lbjmTxQKtuBd) for (B6UAF1zReOyJ, fSdw5wwLo9MO) in _kV_Bomx8PZ4(lbjmTxQKtuBd): if fSdw5wwLo9MO: CmNScfxJ1Uih = iYxGSEeEPM9b[B6UAF1zReOyJ] cm_ZA3JJLKFl = iYxGSEeEPM9b[B6UAF1zReOyJ + nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + chr(0b110001), 8):] < CmNScfxJ1Uih BBM8dxm7YWge[B6UAF1zReOyJ + nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001), 8):][cm_ZA3JJLKFl] = nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + '\061', 8) nb1PCJiiJkkG[BBM8dxm7YWge] = nDF4gVNx0u9Q.NaN return nb1PCJiiJkkG
pyoceans/python-ctd
ctd/processing.py
bindata
def bindata(df, delta=1.0, method="average"): """ Bin average the index (usually pressure) to a given interval (default delta = 1). """ start = np.floor(df.index[0]) stop = np.ceil(df.index[-1]) new_index = np.arange(start, stop, delta) binned = pd.cut(df.index, bins=new_index) if method == "average": new_df = df.groupby(binned).mean() new_df.index = new_index[:-1] elif method == "interpolate": raise NotImplementedError( "Bin-average via interpolation method is not Implemented yet." ) else: raise ValueError( f"Expected method `average` or `interpolate`, but got {method}." ) return new_df
python
def bindata(df, delta=1.0, method="average"): """ Bin average the index (usually pressure) to a given interval (default delta = 1). """ start = np.floor(df.index[0]) stop = np.ceil(df.index[-1]) new_index = np.arange(start, stop, delta) binned = pd.cut(df.index, bins=new_index) if method == "average": new_df = df.groupby(binned).mean() new_df.index = new_index[:-1] elif method == "interpolate": raise NotImplementedError( "Bin-average via interpolation method is not Implemented yet." ) else: raise ValueError( f"Expected method `average` or `interpolate`, but got {method}." ) return new_df
[ "def", "bindata", "(", "df", ",", "delta", "=", "1.0", ",", "method", "=", "\"average\"", ")", ":", "start", "=", "np", ".", "floor", "(", "df", ".", "index", "[", "0", "]", ")", "stop", "=", "np", ".", "ceil", "(", "df", ".", "index", "[", "-", "1", "]", ")", "new_index", "=", "np", ".", "arange", "(", "start", ",", "stop", ",", "delta", ")", "binned", "=", "pd", ".", "cut", "(", "df", ".", "index", ",", "bins", "=", "new_index", ")", "if", "method", "==", "\"average\"", ":", "new_df", "=", "df", ".", "groupby", "(", "binned", ")", ".", "mean", "(", ")", "new_df", ".", "index", "=", "new_index", "[", ":", "-", "1", "]", "elif", "method", "==", "\"interpolate\"", ":", "raise", "NotImplementedError", "(", "\"Bin-average via interpolation method is not Implemented yet.\"", ")", "else", ":", "raise", "ValueError", "(", "f\"Expected method `average` or `interpolate`, but got {method}.\"", ")", "return", "new_df" ]
Bin average the index (usually pressure) to a given interval (default delta = 1).
[ "Bin", "average", "the", "index", "(", "usually", "pressure", ")", "to", "a", "given", "interval", "(", "default", "delta", "=", "1", ")", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L102-L123
train
Bin average the index to a given interval.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmq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07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(194 - 143) + '\x30' + chr(0b11110 + 0o24), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b1010 + 0o51) + chr(48) + '\061', 39401 - 39393), nzTpIcepk0o8(chr(1843 - 1795) + '\x6f' + chr(0b11000 + 0o32) + chr(630 - 579) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7971 - 7860) + chr(0b110001) + chr(0b110111) + chr(0b101011 + 0o10), 60794 - 60786), nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + '\062' + chr(0b11011 + 0o33) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101111 + 0o3) + '\061' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b11001 + 0o27) + chr(0b1110 + 0o43), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1010 + 0o52) + chr(0b100000 + 0o26), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + '\x33' + chr(0b101000 + 0o15), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + '\065' + chr(2197 - 2143), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8854 - 8743) + '\x36' + '\x34', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100000 + 0o23) + '\x32' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(524 - 476) + '\157' + chr(0b1110 + 0o43) + '\065' + chr(1210 - 1161), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(52) + '\064', 0o10), nzTpIcepk0o8(chr(2224 - 2176) + chr(4232 - 4121) + chr(0b11100 + 0o33) + chr(48), 64000 - 63992), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(51) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1767 - 1718) + chr(0b110100) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110110) + chr(0b1010 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + '\064' + chr(0b110100 + 0o2), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\x37' + chr(416 - 362), 65466 - 65458), nzTpIcepk0o8(chr(480 - 432) + chr(0b1010011 + 0o34) + '\063' + chr(53) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\064' + chr(53), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(0b110011) + chr(0b110001) + chr(0b110000), 44449 - 44441), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(0b110011) + chr(0b100001 + 0o25) + chr(49), 47186 - 47178), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\x31' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000101 + 0o52) + chr(2672 - 2620) + chr(379 - 324), 41840 - 41832), nzTpIcepk0o8(chr(2264 - 2216) + chr(6659 - 6548) + chr(1497 - 1448) + chr(0b11000 + 0o33) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\061' + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1109 - 1059) + chr(52) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1276 - 1228) + chr(0b1101111) + '\x32' + chr(0b110101), 10683 - 10675), nzTpIcepk0o8(chr(48) + '\x6f' + chr(134 - 84) + '\067' + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111010 + 0o65) + '\x33', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(11979 - 11868) + chr(0b110101) + chr(0b110110), 8), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + '\062' + '\064' + chr(0b111 + 0o56), 0b1000), nzTpIcepk0o8(chr(163 - 115) + chr(111) + chr(0b100010 + 0o20) + chr(0b110001) + chr(0b11000 + 0o30), 0o10), nzTpIcepk0o8(chr(2049 - 2001) + chr(9001 - 8890) + chr(49) + chr(0b110111) + chr(0b1 + 0o65), 15211 - 15203), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(50) + chr(713 - 661), 7489 - 7481)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(53) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xec'), chr(0b10110 + 0o116) + chr(101) + chr(1170 - 1071) + chr(9547 - 9436) + chr(0b1010011 + 0o21) + chr(4007 - 3906))(chr(11930 - 11813) + chr(116) + chr(0b1010000 + 0o26) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lj7enERoOzmV(jpOn8DNZxbbx, FLz8xIvnAyD6=1.0, e5rcHW8hR5dL=roI3spqORKae(ES5oEprVxulp(b'\xa3\xb7\xfd\t\xd1\xe8$'), chr(0b1000001 + 0o43) + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(101))('\x75' + '\x74' + '\x66' + '\055' + chr(0b110001 + 0o7))): KQbHFTcl_LKy = nDF4gVNx0u9Q.floor(jpOn8DNZxbbx.ZpfN5tSLaZze[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x30', 0b1000)]) dYJbBiYO_nGE = nDF4gVNx0u9Q.ceil(jpOn8DNZxbbx.ZpfN5tSLaZze[-nzTpIcepk0o8('\060' + chr(111) + '\061', 0b1000)]) rk70SgGzAAom = nDF4gVNx0u9Q.chmI_GMU_sEi(KQbHFTcl_LKy, dYJbBiYO_nGE, FLz8xIvnAyD6) HjJ9UDZ5TYB4 = HLKt4sa1j9hm.cut(jpOn8DNZxbbx.ZpfN5tSLaZze, bins=rk70SgGzAAom) if e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b'\xa3\xb7\xfd\t\xd1\xe8$'), chr(5131 - 5031) + '\145' + '\x63' + chr(111) + '\144' + chr(0b100011 + 0o102))('\165' + chr(0b10100 + 0o140) + chr(3204 - 3102) + '\x2d' + chr(1065 - 1009)): nb1PCJiiJkkG = jpOn8DNZxbbx.groupby(HjJ9UDZ5TYB4).JE1frtxECu3x() nb1PCJiiJkkG.ZpfN5tSLaZze = rk70SgGzAAom[:-nzTpIcepk0o8(chr(0b110000) + chr(7057 - 6946) + chr(903 - 854), 8)] elif e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b'\xab\xaf\xec\x1e\xc2\xff.J|ZQ'), chr(0b101110 + 0o66) + chr(101) + chr(0b1001001 + 0o32) + chr(0b1101111) + chr(9734 - 9634) + chr(0b101110 + 0o67))(chr(0b1110101) + chr(0b1100000 + 0o24) + chr(0b1100110) + chr(0b101101) + chr(0b111000)): raise Y1otPTwLRJvi(roI3spqORKae(ES5oEprVxulp(b'\x80\xa8\xf6V\xd1\xf9$T|IQ\xf1\x1fgE\x18y\xb0v\x00\xc5V\xd1\x82D\xbc\x98\xe3I}\xe3\xc2a\xd3lJ\x85\xe1\rt\xac\xae\xec[\xf9\xe21JxCQ\xbf\x1dk@\x18i\xbbvK'), chr(7391 - 7291) + '\x65' + chr(0b1010111 + 0o14) + '\157' + chr(0b11101 + 0o107) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(102) + chr(45) + chr(0b101000 + 0o20))) else: raise WbNHlDKpyPtQ(f'Expected method `average` or `interpolate`, but got {e5rcHW8hR5dL}.') return nb1PCJiiJkkG
pyoceans/python-ctd
ctd/processing.py
_despike
def _despike(series, n1, n2, block, keep): """ Wild Edit Seabird-like function. Passes with Standard deviation `n1` and `n2` with window size `block`. """ data = series.values.astype(float).copy() roll = _rolling_window(data, block) roll = ma.masked_invalid(roll) std = n1 * roll.std(axis=1) mean = roll.mean(axis=1) # Use the last value to fill-up. std = np.r_[std, np.tile(std[-1], block - 1)] mean = np.r_[mean, np.tile(mean[-1], block - 1)] mask = np.abs(data - mean.filled(fill_value=np.NaN)) > std.filled( fill_value=np.NaN ) data[mask] = np.NaN # Pass two recompute the mean and std without the flagged values from pass # one and removed the flagged data. roll = _rolling_window(data, block) roll = ma.masked_invalid(roll) std = n2 * roll.std(axis=1) mean = roll.mean(axis=1) # Use the last value to fill-up. std = np.r_[std, np.tile(std[-1], block - 1)] mean = np.r_[mean, np.tile(mean[-1], block - 1)] values = series.values.astype(float) mask = np.abs(values - mean.filled(fill_value=np.NaN)) > std.filled( fill_value=np.NaN ) clean = series.astype(float).copy() clean[mask] = np.NaN return clean
python
def _despike(series, n1, n2, block, keep): """ Wild Edit Seabird-like function. Passes with Standard deviation `n1` and `n2` with window size `block`. """ data = series.values.astype(float).copy() roll = _rolling_window(data, block) roll = ma.masked_invalid(roll) std = n1 * roll.std(axis=1) mean = roll.mean(axis=1) # Use the last value to fill-up. std = np.r_[std, np.tile(std[-1], block - 1)] mean = np.r_[mean, np.tile(mean[-1], block - 1)] mask = np.abs(data - mean.filled(fill_value=np.NaN)) > std.filled( fill_value=np.NaN ) data[mask] = np.NaN # Pass two recompute the mean and std without the flagged values from pass # one and removed the flagged data. roll = _rolling_window(data, block) roll = ma.masked_invalid(roll) std = n2 * roll.std(axis=1) mean = roll.mean(axis=1) # Use the last value to fill-up. std = np.r_[std, np.tile(std[-1], block - 1)] mean = np.r_[mean, np.tile(mean[-1], block - 1)] values = series.values.astype(float) mask = np.abs(values - mean.filled(fill_value=np.NaN)) > std.filled( fill_value=np.NaN ) clean = series.astype(float).copy() clean[mask] = np.NaN return clean
[ "def", "_despike", "(", "series", ",", "n1", ",", "n2", ",", "block", ",", "keep", ")", ":", "data", "=", "series", ".", "values", ".", "astype", "(", "float", ")", ".", "copy", "(", ")", "roll", "=", "_rolling_window", "(", "data", ",", "block", ")", "roll", "=", "ma", ".", "masked_invalid", "(", "roll", ")", "std", "=", "n1", "*", "roll", ".", "std", "(", "axis", "=", "1", ")", "mean", "=", "roll", ".", "mean", "(", "axis", "=", "1", ")", "# Use the last value to fill-up.", "std", "=", "np", ".", "r_", "[", "std", ",", "np", ".", "tile", "(", "std", "[", "-", "1", "]", ",", "block", "-", "1", ")", "]", "mean", "=", "np", ".", "r_", "[", "mean", ",", "np", ".", "tile", "(", "mean", "[", "-", "1", "]", ",", "block", "-", "1", ")", "]", "mask", "=", "np", ".", "abs", "(", "data", "-", "mean", ".", "filled", "(", "fill_value", "=", "np", ".", "NaN", ")", ")", ">", "std", ".", "filled", "(", "fill_value", "=", "np", ".", "NaN", ")", "data", "[", "mask", "]", "=", "np", ".", "NaN", "# Pass two recompute the mean and std without the flagged values from pass", "# one and removed the flagged data.", "roll", "=", "_rolling_window", "(", "data", ",", "block", ")", "roll", "=", "ma", ".", "masked_invalid", "(", "roll", ")", "std", "=", "n2", "*", "roll", ".", "std", "(", "axis", "=", "1", ")", "mean", "=", "roll", ".", "mean", "(", "axis", "=", "1", ")", "# Use the last value to fill-up.", "std", "=", "np", ".", "r_", "[", "std", ",", "np", ".", "tile", "(", "std", "[", "-", "1", "]", ",", "block", "-", "1", ")", "]", "mean", "=", "np", ".", "r_", "[", "mean", ",", "np", ".", "tile", "(", "mean", "[", "-", "1", "]", ",", "block", "-", "1", ")", "]", "values", "=", "series", ".", "values", ".", "astype", "(", "float", ")", "mask", "=", "np", ".", "abs", "(", "values", "-", "mean", ".", "filled", "(", "fill_value", "=", "np", ".", "NaN", ")", ")", ">", "std", ".", "filled", "(", "fill_value", "=", "np", ".", "NaN", ")", "clean", "=", "series", ".", "astype", "(", "float", ")", ".", "copy", "(", ")", "clean", "[", "mask", "]", "=", "np", ".", "NaN", "return", "clean" ]
Wild Edit Seabird-like function. Passes with Standard deviation `n1` and `n2` with window size `block`.
[ "Wild", "Edit", "Seabird", "-", "like", "function", ".", "Passes", "with", "Standard", "deviation", "n1", "and", "n2", "with", "window", "size", "block", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L126-L162
train
Passes with Standard deviation n1 and n2 with window size block.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5M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fuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(4129 - 4018) + chr(1068 - 1018) + '\x32' + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\064' + chr(119 - 69), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + chr(51) + '\x36' + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110 + 0o56) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b110010) + chr(0b1111 + 0o50), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1445 - 1395) + '\x31' + chr(0b110110), 27068 - 27060), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1011 + 0o54) + chr(49), 0o10), nzTpIcepk0o8(chr(2105 - 2057) + chr(0b1001010 + 0o45) + '\062' + chr(0b110110) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1395 - 1345) + chr(49) + chr(0b110011 + 0o1), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + '\061' + chr(48) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(5543 - 5432) + '\x32' + chr(0b110101), 28928 - 28920), nzTpIcepk0o8('\x30' + chr(111) + chr(1798 - 1750), 0b1000), nzTpIcepk0o8(chr(2086 - 2038) + '\157' + chr(50) + chr(0b11101 + 0o27), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4754 - 4643) + chr(51) + '\x34' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + '\x33', 0o10), nzTpIcepk0o8(chr(1170 - 1122) + chr(0b1101111) + '\063' + '\061' + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(556 - 507), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2372 - 2319) + '\x34', 0b1000), nzTpIcepk0o8(chr(2114 - 2066) + chr(0b11011 + 0o124) + chr(0b110001) + chr(0b1011 + 0o47) + chr(0b110001 + 0o6), 8), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(1502 - 1450) + chr(53), 62525 - 62517), nzTpIcepk0o8(chr(1997 - 1949) + chr(0b110101 + 0o72) + '\x37' + chr(2303 - 2248), 23938 - 23930), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\065' + chr(319 - 265), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b101010 + 0o14) + chr(0b110110), 8), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + '\x32' + '\x35' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1011001 + 0o26) + '\x31', 8), nzTpIcepk0o8('\060' + chr(111) + chr(509 - 459) + '\x32' + chr(0b1000 + 0o52), 0b1000), nzTpIcepk0o8(chr(262 - 214) + chr(111) + chr(0b110010) + chr(0b110110), 62716 - 62708), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11011 + 0o30) + chr(120 - 69) + chr(2454 - 2404), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2637 - 2583) + chr(0b110101), 31716 - 31708), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(4514 - 4403) + chr(0b110011) + chr(0b110000) + chr(51), 64611 - 64603), nzTpIcepk0o8('\060' + chr(9419 - 9308) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100001 + 0o20) + '\x36' + chr(0b110000 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110100 + 0o3) + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b11011 + 0o32), ord("\x08")), nzTpIcepk0o8(chr(2204 - 2156) + '\157' + chr(203 - 150) + chr(278 - 230), ord("\x08")), nzTpIcepk0o8(chr(428 - 380) + chr(111) + chr(0b110001) + '\067' + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + '\x34' + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(1878 - 1829) + chr(1225 - 1171), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1101 + 0o44) + '\064' + chr(0b110110), 39636 - 39628)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbf'), chr(0b1100100) + chr(0b111100 + 0o51) + '\143' + chr(0b1101111) + chr(0b11110 + 0o106) + chr(0b1100101))(chr(9502 - 9385) + chr(116) + '\146' + chr(0b100 + 0o51) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def xip5B0a2FYjb(TwsKAaNb6gxd, YYJGqULB4ite, vX1Eq0k9zbZq, TvT0D2rIGW5A, FL7W1vfMD1ni): FfKOThdpoDTb = TwsKAaNb6gxd.values.astype(jLW6pRf2DSRk).copy() BfkVQmL7oxvF = OCf545NJtUVj(FfKOThdpoDTb, TvT0D2rIGW5A) BfkVQmL7oxvF = sguG5TnFHWTj.masked_invalid(BfkVQmL7oxvF) AFfTx5xLlh3B = YYJGqULB4ite * BfkVQmL7oxvF.AFfTx5xLlh3B(axis=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), 8)) JE1frtxECu3x = BfkVQmL7oxvF.JE1frtxECu3x(axis=nzTpIcepk0o8(chr(719 - 671) + chr(4366 - 4255) + '\061', 8)) AFfTx5xLlh3B = nDF4gVNx0u9Q.r_[AFfTx5xLlh3B, nDF4gVNx0u9Q.tile(AFfTx5xLlh3B[-nzTpIcepk0o8(chr(0b110 + 0o52) + chr(12232 - 12121) + chr(911 - 862), 8)], TvT0D2rIGW5A - nzTpIcepk0o8(chr(48) + '\157' + chr(0b10101 + 0o34), 8))] JE1frtxECu3x = nDF4gVNx0u9Q.r_[JE1frtxECu3x, nDF4gVNx0u9Q.tile(JE1frtxECu3x[-nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + chr(49), 8)], TvT0D2rIGW5A - nzTpIcepk0o8('\060' + '\x6f' + '\061', 8))] BBM8dxm7YWge = nDF4gVNx0u9Q.zQBGwUT7UU8L(FfKOThdpoDTb - JE1frtxECu3x.filled(fill_value=nDF4gVNx0u9Q.NaN)) > AFfTx5xLlh3B.filled(fill_value=nDF4gVNx0u9Q.NaN) FfKOThdpoDTb[BBM8dxm7YWge] = nDF4gVNx0u9Q.NaN BfkVQmL7oxvF = OCf545NJtUVj(FfKOThdpoDTb, TvT0D2rIGW5A) BfkVQmL7oxvF = sguG5TnFHWTj.masked_invalid(BfkVQmL7oxvF) AFfTx5xLlh3B = vX1Eq0k9zbZq * BfkVQmL7oxvF.AFfTx5xLlh3B(axis=nzTpIcepk0o8(chr(48) + '\x6f' + '\061', 8)) JE1frtxECu3x = BfkVQmL7oxvF.JE1frtxECu3x(axis=nzTpIcepk0o8('\060' + '\157' + chr(0b1011 + 0o46), 8)) AFfTx5xLlh3B = nDF4gVNx0u9Q.r_[AFfTx5xLlh3B, nDF4gVNx0u9Q.tile(AFfTx5xLlh3B[-nzTpIcepk0o8('\060' + '\157' + '\061', 8)], TvT0D2rIGW5A - nzTpIcepk0o8(chr(118 - 70) + '\157' + '\061', 8))] JE1frtxECu3x = nDF4gVNx0u9Q.r_[JE1frtxECu3x, nDF4gVNx0u9Q.tile(JE1frtxECu3x[-nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(762 - 713), 8)], TvT0D2rIGW5A - nzTpIcepk0o8('\060' + chr(111) + chr(0b1 + 0o60), 8))] CsodZJH6x9Tx = TwsKAaNb6gxd.values.xqAChpcBkssb(jLW6pRf2DSRk) BBM8dxm7YWge = nDF4gVNx0u9Q.zQBGwUT7UU8L(CsodZJH6x9Tx - JE1frtxECu3x.filled(fill_value=nDF4gVNx0u9Q.NaN)) > AFfTx5xLlh3B.filled(fill_value=nDF4gVNx0u9Q.NaN) MY03ioefkAzT = TwsKAaNb6gxd.astype(jLW6pRf2DSRk).copy() MY03ioefkAzT[BBM8dxm7YWge] = nDF4gVNx0u9Q.NaN return MY03ioefkAzT
pyoceans/python-ctd
ctd/processing.py
despike
def despike(df, n1=2, n2=20, block=100, keep=0): """ Wild Edit Seabird-like function. Passes with Standard deviation `n1` and `n2` with window size `block`. """ if isinstance(df, pd.Series): new_df = _despike(df, n1=n1, n2=n2, block=block, keep=keep) else: new_df = df.apply(_despike, n1=n1, n2=n2, block=block, keep=keep) return new_df
python
def despike(df, n1=2, n2=20, block=100, keep=0): """ Wild Edit Seabird-like function. Passes with Standard deviation `n1` and `n2` with window size `block`. """ if isinstance(df, pd.Series): new_df = _despike(df, n1=n1, n2=n2, block=block, keep=keep) else: new_df = df.apply(_despike, n1=n1, n2=n2, block=block, keep=keep) return new_df
[ "def", "despike", "(", "df", ",", "n1", "=", "2", ",", "n2", "=", "20", ",", "block", "=", "100", ",", "keep", "=", "0", ")", ":", "if", "isinstance", "(", "df", ",", "pd", ".", "Series", ")", ":", "new_df", "=", "_despike", "(", "df", ",", "n1", "=", "n1", ",", "n2", "=", "n2", ",", "block", "=", "block", ",", "keep", "=", "keep", ")", "else", ":", "new_df", "=", "df", ".", "apply", "(", "_despike", ",", "n1", "=", "n1", ",", "n2", "=", "n2", ",", "block", "=", "block", ",", "keep", "=", "keep", ")", "return", "new_df" ]
Wild Edit Seabird-like function. Passes with Standard deviation `n1` and `n2` with window size `block`.
[ "Wild", "Edit", "Seabird", "-", "like", "function", ".", "Passes", "with", "Standard", "deviation", "n1", "and", "n2", "with", "window", "size", "block", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L167-L177
train
Wild Edit Seabird - like function. Passes with Standard deviation n1 and n2 with window size block.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqet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U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(7750 - 7639) + chr(0b101101 + 0o6) + chr(0b10000 + 0o44) + chr(2219 - 2169), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(376 - 327) + chr(889 - 840) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x35' + '\062', 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(11378 - 11267) + chr(49) + chr(0b110010) + chr(0b110100), 20752 - 20744), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10010 + 0o41) + chr(742 - 688) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + '\061' + chr(0b1100 + 0o51) + chr(0b110100 + 0o0), ord("\x08")), nzTpIcepk0o8(chr(1747 - 1699) + '\157' + chr(0b100010 + 0o20) + chr(0b110010) + chr(0b101000 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + chr(2502 - 2451) + chr(0b110101) + '\x32', 16588 - 16580), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110 + 0o52) + chr(1545 - 1490), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\064' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(0b101110 + 0o5) + chr(1443 - 1391) + '\x36', 40837 - 40829), nzTpIcepk0o8(chr(748 - 700) + chr(0b111 + 0o150) + chr(1284 - 1234) + chr(2697 - 2644) + chr(2365 - 2315), 60161 - 60153), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + '\061' + '\062' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101000 + 0o12) + '\064' + chr(1912 - 1859), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101001 + 0o106) + chr(749 - 698) + '\063' + '\x37', 27025 - 27017), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(8028 - 7917) + chr(0b10100 + 0o36), 23619 - 23611), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10 + 0o57) + '\x36' + chr(2486 - 2431), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + chr(50), 8), nzTpIcepk0o8(chr(835 - 787) + chr(111) + chr(0b100000 + 0o22) + chr(0b100111 + 0o16) + chr(0b11000 + 0o36), 23881 - 23873), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(2789 - 2735) + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(49) + chr(49) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b110011) + chr(2370 - 2318), ord("\x08")), nzTpIcepk0o8(chr(1929 - 1881) + chr(0b1101111) + chr(0b110011) + chr(185 - 130) + chr(52), 45484 - 45476), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11100 + 0o31) + chr(2145 - 2090), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\064' + '\065', 56118 - 56110), nzTpIcepk0o8(chr(1857 - 1809) + chr(2606 - 2495) + chr(50) + chr(51) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(49) + chr(0b10000 + 0o44), 0o10), nzTpIcepk0o8(chr(645 - 597) + chr(8832 - 8721) + chr(0b110010) + chr(2245 - 2191), 58793 - 58785), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(2357 - 2303) + chr(1751 - 1698), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11100 + 0o32) + chr(1719 - 1669), 0b1000), nzTpIcepk0o8('\x30' + chr(8693 - 8582) + chr(307 - 256) + '\063' + chr(0b10111 + 0o34), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(50) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b10011 + 0o134) + chr(0b110010) + chr(0b110101 + 0o1) + chr(1021 - 966), 8803 - 8795), nzTpIcepk0o8('\x30' + '\x6f' + chr(1697 - 1646) + chr(50) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110010 + 0o4) + '\063', 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + '\x33' + '\x34' + chr(553 - 503), 8), nzTpIcepk0o8(chr(2055 - 2007) + chr(0b1001110 + 0o41) + '\061' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x37' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4694 - 4583) + '\x32' + chr(0b110111), 11279 - 11271)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1001010 + 0o45) + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcc'), '\x64' + chr(3740 - 3639) + '\x63' + chr(111) + '\144' + '\145')(chr(0b1110101) + chr(0b1011010 + 0o32) + chr(5768 - 5666) + '\055' + chr(1150 - 1094)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def mYdFvzKC785j(jpOn8DNZxbbx, YYJGqULB4ite=nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32', 8), vX1Eq0k9zbZq=nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(1089 - 1037), ord("\x08")), TvT0D2rIGW5A=nzTpIcepk0o8(chr(1880 - 1832) + chr(768 - 657) + chr(0b110001) + chr(0b11 + 0o61) + '\x34', 0b1000), FL7W1vfMD1ni=nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b110000), 0o10)): if suIjIS24Zkqw(jpOn8DNZxbbx, roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\xb1-X=\x93\x1f'), chr(100) + chr(101) + chr(1357 - 1258) + chr(3143 - 3032) + chr(0b1100100) + chr(101))('\165' + chr(116) + '\146' + chr(0b101101) + chr(0b10 + 0o66)))): nb1PCJiiJkkG = xip5B0a2FYjb(jpOn8DNZxbbx, n1=YYJGqULB4ite, n2=vX1Eq0k9zbZq, block=TvT0D2rIGW5A, keep=FL7W1vfMD1ni) else: nb1PCJiiJkkG = jpOn8DNZxbbx.apply(xip5B0a2FYjb, n1=YYJGqULB4ite, n2=vX1Eq0k9zbZq, block=TvT0D2rIGW5A, keep=FL7W1vfMD1ni) return nb1PCJiiJkkG
pyoceans/python-ctd
ctd/processing.py
_smooth
def _smooth(series, window_len, window): """Smooth the data using a window with requested size.""" windows = { "flat": np.ones, "hanning": np.hanning, "hamming": np.hamming, "bartlett": np.bartlett, "blackman": np.blackman, } data = series.values.copy() if window_len < 3: return pd.Series(data, index=series.index, name=series.name) if window not in list(windows.keys()): raise ValueError( """window must be one of 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'""" ) s = np.r_[ 2 * data[0] - data[window_len:1:-1], data, 2 * data[-1] - data[-1:-window_len:-1], ] w = windows[window](window_len) data = np.convolve(w / w.sum(), s, mode="same") data = data[window_len - 1 : -window_len + 1] return pd.Series(data, index=series.index, name=series.name)
python
def _smooth(series, window_len, window): """Smooth the data using a window with requested size.""" windows = { "flat": np.ones, "hanning": np.hanning, "hamming": np.hamming, "bartlett": np.bartlett, "blackman": np.blackman, } data = series.values.copy() if window_len < 3: return pd.Series(data, index=series.index, name=series.name) if window not in list(windows.keys()): raise ValueError( """window must be one of 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'""" ) s = np.r_[ 2 * data[0] - data[window_len:1:-1], data, 2 * data[-1] - data[-1:-window_len:-1], ] w = windows[window](window_len) data = np.convolve(w / w.sum(), s, mode="same") data = data[window_len - 1 : -window_len + 1] return pd.Series(data, index=series.index, name=series.name)
[ "def", "_smooth", "(", "series", ",", "window_len", ",", "window", ")", ":", "windows", "=", "{", "\"flat\"", ":", "np", ".", "ones", ",", "\"hanning\"", ":", "np", ".", "hanning", ",", "\"hamming\"", ":", "np", ".", "hamming", ",", "\"bartlett\"", ":", "np", ".", "bartlett", ",", "\"blackman\"", ":", "np", ".", "blackman", ",", "}", "data", "=", "series", ".", "values", ".", "copy", "(", ")", "if", "window_len", "<", "3", ":", "return", "pd", ".", "Series", "(", "data", ",", "index", "=", "series", ".", "index", ",", "name", "=", "series", ".", "name", ")", "if", "window", "not", "in", "list", "(", "windows", ".", "keys", "(", ")", ")", ":", "raise", "ValueError", "(", "\"\"\"window must be one of 'flat', 'hanning',\n 'hamming', 'bartlett', 'blackman'\"\"\"", ")", "s", "=", "np", ".", "r_", "[", "2", "*", "data", "[", "0", "]", "-", "data", "[", "window_len", ":", "1", ":", "-", "1", "]", ",", "data", ",", "2", "*", "data", "[", "-", "1", "]", "-", "data", "[", "-", "1", ":", "-", "window_len", ":", "-", "1", "]", ",", "]", "w", "=", "windows", "[", "window", "]", "(", "window_len", ")", "data", "=", "np", ".", "convolve", "(", "w", "/", "w", ".", "sum", "(", ")", ",", "s", ",", "mode", "=", "\"same\"", ")", "data", "=", "data", "[", "window_len", "-", "1", ":", "-", "window_len", "+", "1", "]", "return", "pd", ".", "Series", "(", "data", ",", "index", "=", "series", ".", "index", ",", "name", "=", "series", ".", "name", ")" ]
Smooth the data using a window with requested size.
[ "Smooth", "the", "data", "using", "a", "window", "with", "requested", "size", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L180-L211
train
Smooth the data using a window with requested size.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aC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tJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(588 - 540) + chr(2527 - 2416) + '\061' + chr(0b10111 + 0o33) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(1690 - 1642) + chr(0b110101 + 0o72) + '\x33' + '\x30' + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(52) + '\067', 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(54) + chr(54), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + '\061' + '\x36', 36824 - 36816), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110010) + chr(50), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(55) + chr(2261 - 2206), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(387 - 336) + chr(0b110111) + chr(0b11010 + 0o26), 56395 - 56387), nzTpIcepk0o8('\060' + chr(9096 - 8985) + chr(0b11111 + 0o24) + '\x33' + chr(2782 - 2727), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(51) + chr(0b110000 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\065' + chr(0b101000 + 0o10), 17042 - 17034), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(50) + '\060', 0b1000), nzTpIcepk0o8(chr(1947 - 1899) + chr(0b100101 + 0o112) + '\x31' + '\060' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(1771 - 1720) + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10 + 0o61) + chr(0b10 + 0o60) + chr(2588 - 2535), 33293 - 33285), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(1512 - 1401) + '\x34' + '\063', 11021 - 11013), nzTpIcepk0o8('\060' + chr(0b111110 + 0o61) + chr(51) + chr(220 - 171) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110110) + chr(0b100000 + 0o23), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(50) + chr(54) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(606 - 558) + chr(0b1101111) + chr(51) + chr(0b101010 + 0o11) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b110010) + chr(0b11110 + 0o22), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(0b1001 + 0o54) + chr(0b100010 + 0o25), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(0b110111) + chr(49), 4830 - 4822), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(52) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(326 - 278) + chr(0b111000 + 0o67) + chr(49) + chr(0b110111) + chr(1624 - 1575), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(3329 - 3218) + chr(1514 - 1459), 37222 - 37214), nzTpIcepk0o8(chr(1177 - 1129) + chr(0b1101111) + chr(50) + '\x34' + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(8766 - 8655) + '\x33' + '\062' + chr(0b10100 + 0o34), 8), nzTpIcepk0o8(chr(958 - 910) + chr(0b1101111) + chr(51) + chr(54) + chr(0b110010 + 0o5), 51890 - 51882), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(54) + chr(2078 - 2024), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(240 - 189), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b1100 + 0o45) + '\x32' + chr(512 - 461), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(48) + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\x31' + '\x34', 46803 - 46795), nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + chr(2156 - 2106) + '\063' + chr(0b10001 + 0o40), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(633 - 583) + chr(49) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b10101 + 0o37) + chr(2673 - 2621), 18280 - 18272), nzTpIcepk0o8('\x30' + chr(0b1111 + 0o140) + chr(0b110011) + chr(0b110111) + chr(0b101100 + 0o6), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(659 - 548) + '\065' + '\060', 7099 - 7091)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'}'), chr(0b10 + 0o142) + chr(435 - 334) + '\x63' + chr(111) + chr(0b1110 + 0o126) + chr(0b101100 + 0o71))(chr(5452 - 5335) + '\x74' + chr(0b1100110) + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def sJfDwNRnL6YB(TwsKAaNb6gxd, _rzo8mN2WpYg, Mv1_GoAS2xK3): hVZaXHr1SthH = {roI3spqORKae(ES5oEprVxulp(b'5\xad\x86B'), '\144' + chr(6329 - 6228) + chr(99) + '\x6f' + chr(0b111111 + 0o45) + chr(101))(chr(0b1101001 + 0o14) + '\164' + chr(0b1100110) + '\x2d' + '\x38'): nDF4gVNx0u9Q.rYPkZ8_2D0X1, roI3spqORKae(ES5oEprVxulp(b';\xa0\x89X\xe7\xfc\x98'), chr(0b10101 + 0o117) + '\145' + chr(7515 - 7416) + chr(0b1101111) + '\144' + chr(101))(chr(221 - 104) + chr(116) + chr(3396 - 3294) + chr(0b101101) + chr(211 - 155)): nDF4gVNx0u9Q.hanning, roI3spqORKae(ES5oEprVxulp(b';\xa0\x8a[\xe7\xfc\x98'), chr(0b1100000 + 0o4) + chr(3782 - 3681) + '\x63' + chr(0b111001 + 0o66) + chr(0b1100100) + chr(2722 - 2621))('\x75' + '\x74' + chr(102) + chr(0b11110 + 0o17) + chr(0b111000)): nDF4gVNx0u9Q.hamming, roI3spqORKae(ES5oEprVxulp(b'1\xa0\x95B\xe2\xf7\x8b\x8c'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + '\144' + chr(0b1110 + 0o127))(chr(4720 - 4603) + chr(5102 - 4986) + chr(102) + chr(0b101101) + chr(0b111000)): nDF4gVNx0u9Q.bartlett, roI3spqORKae(ES5oEprVxulp(b'1\xad\x86U\xe5\xff\x9e\x96'), chr(1033 - 933) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + chr(4756 - 4655))('\x75' + chr(0b101 + 0o157) + '\x66' + chr(1306 - 1261) + chr(0b11111 + 0o31)): nDF4gVNx0u9Q.blackman} FfKOThdpoDTb = TwsKAaNb6gxd.values.copy() if _rzo8mN2WpYg < nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b100110 + 0o111) + chr(0b1000 + 0o53), 47173 - 47165): return roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\x00\xa4\x95_\xeb\xe1'), '\x64' + chr(0b1011111 + 0o6) + chr(0b110 + 0o135) + chr(0b100100 + 0o113) + chr(0b1011101 + 0o7) + chr(3287 - 3186))('\165' + chr(0b1110100) + '\146' + chr(0b101101) + '\x38'))(FfKOThdpoDTb, index=roI3spqORKae(TwsKAaNb6gxd, roI3spqORKae(ES5oEprVxulp(b'\t\xb1\x81x\xbb\xe6\xac\xb4\xbe\xc0\x12\xb5'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(5173 - 5056) + chr(116) + chr(102) + '\x2d' + chr(0b111000))), name=roI3spqORKae(TwsKAaNb6gxd, roI3spqORKae(ES5oEprVxulp(b'\x00\x8d\xb1t\xbc\xd0\xaf\xb9\x80\xf7!\xb5'), chr(0b101 + 0o137) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(267 - 166))('\165' + '\164' + chr(7966 - 7864) + '\055' + chr(56)))) if Mv1_GoAS2xK3 not in H4NoA26ON7iG(roI3spqORKae(hVZaXHr1SthH, roI3spqORKae(ES5oEprVxulp(b'8\xa4\x9eE'), '\144' + chr(0b110100 + 0o61) + '\x63' + chr(1625 - 1514) + '\x64' + chr(8563 - 8462))(chr(10829 - 10712) + '\164' + chr(102) + '\x2d' + chr(2529 - 2473)))()): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'$\xa8\x89R\xe1\xe5\xdf\x95\xaa\xe9\x1c\xf0"\xfa\xf5L\xa5V\x90\xb1\xf6\x0f\x1e\x82\x15f\xd0=\xfc\xd7\xd7\x1ez=\xa9\xe5\xf7\xeeC\xd6Y\xe1\xc7\x16\xae\xb2\xdf\xd8\xff\xbaH\xf0`\xbf\xf5\x03\xeb\x13\x90\xfe\xb0\x0f\x19\xc4Y\'\x83r\xb1\x9a\x9d\x1fu4\xe0\xa0\xb9\xae\x06\x9b!\xb5\x8bS\xfa\xe6\xd8\xd4\xff\xbd\n\xbc!\xfc\xbeN\xaa]\x97'), '\144' + chr(6837 - 6736) + chr(0b1100011) + chr(111) + chr(0b110000 + 0o64) + chr(7707 - 7606))(chr(117) + '\164' + '\x66' + '\055' + chr(1698 - 1642))) PmE5_h409JAA = nDF4gVNx0u9Q.r_[nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(438 - 388), ord("\x08")) * FfKOThdpoDTb[nzTpIcepk0o8('\x30' + chr(111) + chr(0b100101 + 0o13), ord("\x08"))] - FfKOThdpoDTb[_rzo8mN2WpYg:nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1110 + 0o43), 0b1000):-nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + '\x31', 8)], FfKOThdpoDTb, nzTpIcepk0o8('\x30' + chr(0b1000111 + 0o50) + chr(0b110010), 8) * FfKOThdpoDTb[-nzTpIcepk0o8(chr(111 - 63) + chr(0b1101111) + '\x31', 8)] - FfKOThdpoDTb[-nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + '\x31', 8):-_rzo8mN2WpYg:-nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49), 8)]] sm7_CLmeWGR7 = hVZaXHr1SthH[Mv1_GoAS2xK3](_rzo8mN2WpYg) FfKOThdpoDTb = nDF4gVNx0u9Q.convolve(sm7_CLmeWGR7 / sm7_CLmeWGR7.oclC8DLjA_lV(), PmE5_h409JAA, mode=roI3spqORKae(ES5oEprVxulp(b' \xa0\x8aS'), '\144' + '\x65' + chr(3059 - 2960) + '\157' + chr(0b1100100) + '\145')(chr(0b1110101) + '\164' + chr(0b1001110 + 0o30) + chr(45) + chr(2370 - 2314))) FfKOThdpoDTb = FfKOThdpoDTb[_rzo8mN2WpYg - nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(0b110001), 8):-_rzo8mN2WpYg + nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(6819 - 6708) + chr(0b11111 + 0o22), 8)] return roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\x00\xa4\x95_\xeb\xe1'), '\x64' + '\x65' + chr(99) + '\157' + '\x64' + '\145')('\x75' + chr(0b1100100 + 0o20) + '\x66' + chr(45) + '\x38'))(FfKOThdpoDTb, index=roI3spqORKae(TwsKAaNb6gxd, roI3spqORKae(ES5oEprVxulp(b'\t\xb1\x81x\xbb\xe6\xac\xb4\xbe\xc0\x12\xb5'), '\144' + chr(0b1100101) + '\143' + chr(12195 - 12084) + '\144' + chr(101))(chr(6432 - 6315) + '\x74' + chr(0b1000100 + 0o42) + chr(0b11000 + 0o25) + '\x38')), name=roI3spqORKae(TwsKAaNb6gxd, roI3spqORKae(ES5oEprVxulp(b'\x00\x8d\xb1t\xbc\xd0\xaf\xb9\x80\xf7!\xb5'), chr(1119 - 1019) + chr(101) + chr(0b1010110 + 0o15) + '\157' + chr(100) + chr(101))(chr(0b1110101) + chr(116) + chr(0b110101 + 0o61) + chr(0b1010 + 0o43) + '\x38')))
pyoceans/python-ctd
ctd/processing.py
smooth
def smooth(df, window_len=11, window="hanning"): """Smooth the data using a window with requested size.""" if isinstance(df, pd.Series): new_df = _smooth(df, window_len=window_len, window=window) else: new_df = df.apply(_smooth, window_len=window_len, window=window) return new_df
python
def smooth(df, window_len=11, window="hanning"): """Smooth the data using a window with requested size.""" if isinstance(df, pd.Series): new_df = _smooth(df, window_len=window_len, window=window) else: new_df = df.apply(_smooth, window_len=window_len, window=window) return new_df
[ "def", "smooth", "(", "df", ",", "window_len", "=", "11", ",", "window", "=", "\"hanning\"", ")", ":", "if", "isinstance", "(", "df", ",", "pd", ".", "Series", ")", ":", "new_df", "=", "_smooth", "(", "df", ",", "window_len", "=", "window_len", ",", "window", "=", "window", ")", "else", ":", "new_df", "=", "df", ".", "apply", "(", "_smooth", ",", "window_len", "=", "window_len", ",", "window", "=", "window", ")", "return", "new_df" ]
Smooth the data using a window with requested size.
[ "Smooth", "the", "data", "using", "a", "window", "with", "requested", "size", "." ]
fa9a9d02da3dfed6d1d60db0e52bbab52adfe666
https://github.com/pyoceans/python-ctd/blob/fa9a9d02da3dfed6d1d60db0e52bbab52adfe666/ctd/processing.py#L216-L222
train
Smooth the data using a window with requested size.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmF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DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(507 - 459) + chr(0b1101111) + '\x37' + chr(51), 17608 - 17600), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b101111 + 0o10) + '\065', 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + '\061' + chr(53) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101010 + 0o7) + chr(0b101011 + 0o14) + '\x35', 49042 - 49034), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(49) + chr(836 - 785), 0b1000), nzTpIcepk0o8(chr(149 - 101) + chr(10573 - 10462) + chr(0b110010) + '\062' + chr(52), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100100 + 0o16) + chr(50) + chr(0b110001 + 0o1), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10110 + 0o41) + '\065', 58572 - 58564), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x33' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(721 - 673) + chr(0b1101111) + chr(1216 - 1167) + chr(50) + '\065', 6303 - 6295), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + '\061' + chr(0b110111) + chr(0b101000 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(55) + chr(48), 0b1000), nzTpIcepk0o8(chr(351 - 303) + '\157' + chr(0b100000 + 0o22) + chr(0b110000) + chr(51), 34359 - 34351), nzTpIcepk0o8('\060' + '\x6f' + chr(934 - 884) + chr(0b110110) + chr(49), 15949 - 15941), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + '\x32' + '\x31' + chr(2108 - 2054), 53586 - 53578), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(2155 - 2100) + chr(872 - 824), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1100 + 0o50) + '\063', 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(0b100111 + 0o12) + chr(142 - 94) + chr(52), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b100110 + 0o13) + chr(1535 - 1483) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x35' + chr(0b100001 + 0o17), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b1001 + 0o50) + '\x35' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110100) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + chr(50) + '\062' + '\060', 25182 - 25174), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(61 - 9) + chr(0b101 + 0o54), 8), nzTpIcepk0o8(chr(48) + chr(0b110 + 0o151) + chr(0b100100 + 0o15) + '\060' + chr(1372 - 1320), 8), nzTpIcepk0o8(chr(1374 - 1326) + chr(8885 - 8774) + '\062' + chr(2238 - 2190), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + '\x31' + chr(699 - 644) + '\060', 49987 - 49979), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(203 - 154) + chr(201 - 150) + chr(0b11001 + 0o36), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101110 + 0o3) + '\x34' + '\067', 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + '\061' + '\063' + chr(0b110010 + 0o2), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b110111) + chr(0b10001 + 0o46), 8), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110110 + 0o71) + chr(1881 - 1826), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(0b110011) + chr(55) + chr(1857 - 1805), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b110101) + chr(0b1001 + 0o47), 46864 - 46856), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + '\065' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1390 - 1342) + chr(0b100010 + 0o115) + chr(1788 - 1738) + '\x36' + chr(54), 47025 - 47017), nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + chr(51) + '\060' + '\067', 32433 - 32425)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110100 + 0o1) + chr(1104 - 1056), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x15'), chr(1801 - 1701) + chr(0b1100101) + chr(6301 - 6202) + chr(0b1101111) + '\x64' + chr(0b1011101 + 0o10))('\165' + '\164' + chr(0b1100110) + '\055' + chr(0b11100 + 0o34)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XfpFtdM0c1Sj(jpOn8DNZxbbx, _rzo8mN2WpYg=nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(51), ord("\x08")), Mv1_GoAS2xK3=roI3spqORKae(ES5oEprVxulp(b'S\xdc\x01\x13\xa2\xfa\xf5'), '\x64' + chr(0b1011001 + 0o14) + '\143' + chr(111) + '\144' + chr(0b1100101))(chr(5829 - 5712) + '\164' + chr(0b1010011 + 0o23) + chr(170 - 125) + chr(56))): if suIjIS24Zkqw(jpOn8DNZxbbx, roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'h\xd8\x1d\x14\xae\xe7'), '\144' + chr(101) + '\x63' + chr(111) + chr(100) + '\x65')(chr(2476 - 2359) + '\x74' + '\146' + chr(727 - 682) + chr(0b10 + 0o66)))): nb1PCJiiJkkG = sJfDwNRnL6YB(jpOn8DNZxbbx, window_len=_rzo8mN2WpYg, window=Mv1_GoAS2xK3) else: nb1PCJiiJkkG = jpOn8DNZxbbx.apply(sJfDwNRnL6YB, window_len=_rzo8mN2WpYg, window=Mv1_GoAS2xK3) return nb1PCJiiJkkG
mayhewj/greenstalk
greenstalk.py
Client.put
def put(self, body: Body, priority: int = DEFAULT_PRIORITY, delay: int = DEFAULT_DELAY, ttr: int = DEFAULT_TTR) -> int: """Inserts a job into the currently used tube and returns the job ID. :param body: The data representing the job. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. :param delay: The number of seconds to delay the job for. :param ttr: The maximum number of seconds the job can be reserved for before timing out. """ if isinstance(body, str): if self.encoding is None: raise TypeError("Unable to encode string with no encoding set") body = body.encode(self.encoding) cmd = b'put %d %d %d %d\r\n%b' % (priority, delay, ttr, len(body), body) return self._int_cmd(cmd, b'INSERTED')
python
def put(self, body: Body, priority: int = DEFAULT_PRIORITY, delay: int = DEFAULT_DELAY, ttr: int = DEFAULT_TTR) -> int: """Inserts a job into the currently used tube and returns the job ID. :param body: The data representing the job. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. :param delay: The number of seconds to delay the job for. :param ttr: The maximum number of seconds the job can be reserved for before timing out. """ if isinstance(body, str): if self.encoding is None: raise TypeError("Unable to encode string with no encoding set") body = body.encode(self.encoding) cmd = b'put %d %d %d %d\r\n%b' % (priority, delay, ttr, len(body), body) return self._int_cmd(cmd, b'INSERTED')
[ "def", "put", "(", "self", ",", "body", ":", "Body", ",", "priority", ":", "int", "=", "DEFAULT_PRIORITY", ",", "delay", ":", "int", "=", "DEFAULT_DELAY", ",", "ttr", ":", "int", "=", "DEFAULT_TTR", ")", "->", "int", ":", "if", "isinstance", "(", "body", ",", "str", ")", ":", "if", "self", ".", "encoding", "is", "None", ":", "raise", "TypeError", "(", "\"Unable to encode string with no encoding set\"", ")", "body", "=", "body", ".", "encode", "(", "self", ".", "encoding", ")", "cmd", "=", "b'put %d %d %d %d\\r\\n%b'", "%", "(", "priority", ",", "delay", ",", "ttr", ",", "len", "(", "body", ")", ",", "body", ")", "return", "self", ".", "_int_cmd", "(", "cmd", ",", "b'INSERTED'", ")" ]
Inserts a job into the currently used tube and returns the job ID. :param body: The data representing the job. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. :param delay: The number of seconds to delay the job for. :param ttr: The maximum number of seconds the job can be reserved for before timing out.
[ "Inserts", "a", "job", "into", "the", "currently", "used", "tube", "and", "returns", "the", "job", "ID", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L199-L218
train
Inserts a new job into the currently used tube and returns the ID of the new job.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlD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YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + chr(1676 - 1626) + chr(52) + chr(1974 - 1926), 61248 - 61240), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2288 - 2238) + chr(51), 1058 - 1050), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\060' + chr(2304 - 2256), 0b1000), nzTpIcepk0o8('\060' + chr(0b11100 + 0o123) + chr(1652 - 1601) + chr(1114 - 1061) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(12167 - 12056) + '\062' + chr(0b10110 + 0o36) + chr(129 - 74), 63977 - 63969), nzTpIcepk0o8(chr(1719 - 1671) + chr(0b1000100 + 0o53) + chr(0b100001 + 0o21) + chr(0b110010) + chr(247 - 195), 58808 - 58800), nzTpIcepk0o8('\x30' + '\157' + chr(1320 - 1269) + chr(0b110000) + chr(0b101101 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\x31' + '\061' + chr(0b11111 + 0o21), 0b1000), nzTpIcepk0o8(chr(801 - 753) + chr(0b11001 + 0o126) + '\062' + chr(0b10101 + 0o41) + '\x37', 35606 - 35598), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(836 - 782) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(55) + chr(1409 - 1358), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(918 - 869) + '\x37' + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(790 - 738) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1836 - 1788) + chr(111) + chr(0b11110 + 0o25) + chr(1958 - 1909) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b11111 + 0o23) + chr(885 - 835), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(2016 - 1962) + chr(0b101110 + 0o5), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(2118 - 2070), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(50) + chr(336 - 285), 8), nzTpIcepk0o8('\060' + chr(2347 - 2236) + '\x32' + chr(48) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(7620 - 7509) + '\x32' + '\x33' + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001001 + 0o46) + '\x33' + '\x34' + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b110111) + chr(0b100110 + 0o16), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2388 - 2337) + chr(0b110100) + chr(732 - 678), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10110 + 0o131) + '\062' + chr(48) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(2136 - 2088) + chr(0b1000010 + 0o55) + chr(0b110011) + chr(52) + chr(0b110110), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(2050 - 2000) + chr(55) + chr(0b100 + 0o60), 8), nzTpIcepk0o8(chr(1122 - 1074) + chr(111) + chr(0b100 + 0o55) + '\x35' + chr(2020 - 1966), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8(chr(372 - 324) + '\157' + chr(0b110110) + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x34', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + '\x37' + chr(52), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b110100) + chr(0b10000 + 0o47), 0o10), nzTpIcepk0o8(chr(1696 - 1648) + chr(111) + chr(0b10000 + 0o43) + '\063' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(53) + '\060', 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + '\x31' + chr(2505 - 2450) + chr(0b11011 + 0o34), 12564 - 12556), nzTpIcepk0o8(chr(1130 - 1082) + chr(0b1100000 + 0o17) + '\062' + chr(436 - 386) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(7927 - 7816) + chr(0b110010) + chr(0b110011), 8), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\x34' + chr(1116 - 1063), 0o10), nzTpIcepk0o8(chr(956 - 908) + '\157' + chr(50) + chr(0b11101 + 0o30) + '\x32', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + '\x35' + chr(0b1000 + 0o50), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8e'), chr(4611 - 4511) + chr(101) + chr(3657 - 3558) + chr(0b110011 + 0o74) + chr(100) + chr(7796 - 7695))('\165' + chr(0b1010 + 0o152) + chr(235 - 133) + chr(0b101101) + chr(1744 - 1688)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZD2Lr269ntjx(hXMPsSrOQzbh, ryRPGaxqs24n, NDRX1L7ZRZ6p=fn4I8xM4Mv_P, At656iyyS8xP=UjjTHDcdF1qg, fAXjw0sdYSeR=yZp8rtj8NsqL) -> nzTpIcepk0o8: if suIjIS24Zkqw(ryRPGaxqs24n, N9zlRy29S1SS): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd2g\xb5\x90\xea\xe7\x8ez\xe0u)\x16'), chr(0b1100100) + '\x65' + chr(1764 - 1665) + chr(0b1101111) + chr(0b1100100) + '\x65')('\165' + '\164' + chr(0b1100110) + chr(45) + '\x38')) is None: raise jZIjKu8IFANs(roI3spqORKae(ES5oEprVxulp(b'\xf5}\xe1\x8b\xcb\xf1\xe6<\xd8\x13\x1e\x13F\xa7\xf6Vp`\xf6\xed\x88\xd2\x81\xa1\x91m\xc8\x06?\\k\x9c\x02\xb2\xcb\x10\xf5z\x0b\xcd\x80`\xe5\x9d'), '\x64' + '\x65' + '\143' + chr(0b10101 + 0o132) + chr(0b1100100) + chr(9942 - 9841))(chr(5642 - 5525) + '\164' + chr(102) + chr(0b10001 + 0o34) + chr(56))) ryRPGaxqs24n = ryRPGaxqs24n.YqIaRFfeo4Ha(hXMPsSrOQzbh.rt5yMsH2WFRk) mD44XHfr1PSC = ES5oEprVxulp(b'\xd0f\xf4\xc9\x82\xf0\xe6m\xd3\x13^\x19\x05\xed\xf6>Z6\xe0') % (NDRX1L7ZRZ6p, At656iyyS8xP, fAXjw0sdYSeR, ftfygxgFas5X(ryRPGaxqs24n), ryRPGaxqs24n) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xffz\xee\x9d\xf8\xf7\xab,'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1100111 + 0o10) + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b110000 + 0o10)))(mD44XHfr1PSC, ES5oEprVxulp(b'\xe9]\xd3\xac\xf5\xc0\x83\x0c'))
mayhewj/greenstalk
greenstalk.py
Client.use
def use(self, tube: str) -> None: """Changes the currently used tube. :param tube: The tube to use. """ self._send_cmd(b'use %b' % tube.encode('ascii'), b'USING')
python
def use(self, tube: str) -> None: """Changes the currently used tube. :param tube: The tube to use. """ self._send_cmd(b'use %b' % tube.encode('ascii'), b'USING')
[ "def", "use", "(", "self", ",", "tube", ":", "str", ")", "->", "None", ":", "self", ".", "_send_cmd", "(", "b'use %b'", "%", "tube", ".", "encode", "(", "'ascii'", ")", ",", "b'USING'", ")" ]
Changes the currently used tube. :param tube: The tube to use.
[ "Changes", "the", "currently", "used", "tube", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L220-L225
train
Changes the currently used tube.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJR2ssk3y,gC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v,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(464 - 416) + chr(0b111100 + 0o63) + chr(0b110010) + chr(52) + chr(48), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(0b110010) + chr(52) + chr(0b101111 + 0o2), ord("\x08")), nzTpIcepk0o8('\060' + chr(10772 - 10661) + chr(610 - 560) + '\x34' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110010 + 0o1) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52) + chr(0b11010 + 0o35), 38823 - 38815), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(50) + chr(0b1101 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b110010) + chr(50) + chr(1861 - 1809), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(917 - 867) + chr(48) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(55) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1292 - 1242) + chr(1841 - 1787) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b11100 + 0o123) + chr(2228 - 2178) + '\060' + chr(48), 0b1000), nzTpIcepk0o8(chr(1377 - 1329) + '\157' + '\061' + chr(0b101011 + 0o14) + chr(0b10110 + 0o34), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\x36' + chr(0b101001 + 0o11), 15508 - 15500), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(51) + chr(0b110011) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b10111 + 0o37) + chr(0b1001 + 0o51), 0b1000), nzTpIcepk0o8(chr(968 - 920) + '\157' + chr(0b110011) + chr(271 - 221) + chr(53), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b10111 + 0o33) + chr(318 - 265) + chr(0b110111), 52943 - 52935), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(11315 - 11204) + chr(0b100101 + 0o15) + chr(1932 - 1880) + chr(0b1100 + 0o53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(51) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(2940 - 2829) + chr(0b110100) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(10360 - 10249) + chr(0b110111) + '\x30', 0b1000), nzTpIcepk0o8(chr(1686 - 1638) + '\157' + '\x35' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(5641 - 5530) + chr(0b100101 + 0o16) + chr(370 - 322), 63234 - 63226), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b110010) + chr(0b1100 + 0o45) + chr(2177 - 2122), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + chr(0b100000 + 0o23) + chr(0b110110) + chr(53), 46032 - 46024), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(889 - 840) + chr(0b110001) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(446 - 396) + '\x35' + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b10011 + 0o35) + chr(2760 - 2707), 0o10), nzTpIcepk0o8(chr(48) + chr(1039 - 928) + chr(1467 - 1418) + chr(0b110 + 0o55) + chr(905 - 851), 8), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b11101 + 0o30) + chr(0b1101 + 0o50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4675 - 4564) + chr(50) + '\x31' + '\067', 8), nzTpIcepk0o8(chr(908 - 860) + '\157' + '\x31' + '\x30' + chr(671 - 623), 62697 - 62689), nzTpIcepk0o8('\x30' + chr(8287 - 8176) + chr(880 - 831) + chr(0b101101 + 0o4) + chr(98 - 47), 0o10), nzTpIcepk0o8(chr(48) + chr(6407 - 6296) + chr(49) + '\062' + chr(0b10100 + 0o42), 0o10), nzTpIcepk0o8('\060' + chr(0b1101 + 0o142) + chr(0b1010 + 0o50) + '\063' + chr(0b100000 + 0o21), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(1953 - 1902) + chr(0b101000 + 0o13) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(54) + chr(0b100010 + 0o22), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110001) + '\065', 29325 - 29317), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(382 - 331) + chr(0b110010) + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(0b10011 + 0o43) + chr(0b1111 + 0o43), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2141 - 2093) + chr(7948 - 7837) + chr(2141 - 2088) + chr(1289 - 1241), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8e'), chr(100) + chr(3293 - 3192) + '\143' + '\x6f' + chr(0b111011 + 0o51) + '\x65')('\165' + '\164' + chr(2625 - 2523) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qlc7Qw4n62hi(hXMPsSrOQzbh, c3RFlT7QzD8_) -> None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xff\xd2\xc00C\x8a\xf7\xeeY'), chr(2856 - 2756) + '\145' + chr(99) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100010 + 0o4) + '\055' + chr(0b111000)))(ES5oEprVxulp(b'\xd5\xd2\xc0~\x02\xb7') % roI3spqORKae(c3RFlT7QzD8_, roI3spqORKae(ES5oEprVxulp(b'\xf9\xd0\xec?u\x93\xf2\xe6R\x87\xc8\x1b'), chr(0b10001 + 0o123) + chr(101) + chr(2913 - 2814) + chr(2410 - 2299) + '\x64' + chr(101))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(2196 - 2140)))(roI3spqORKae(ES5oEprVxulp(b'\xc1\xd2\xc67N'), chr(5833 - 5733) + chr(0b1000011 + 0o42) + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(117) + chr(116) + chr(102) + chr(941 - 896) + '\x38')), ES5oEprVxulp(b'\xf5\xf2\xec\x10`'))
mayhewj/greenstalk
greenstalk.py
Client.reserve
def reserve(self, timeout: Optional[int] = None) -> Job: """Reserves a job from a tube on the watch list, giving this client exclusive access to it for the TTR. Returns the reserved job. This blocks until a job is reserved unless a ``timeout`` is given, which will raise a :class:`TimedOutError <greenstalk.TimedOutError>` if a job cannot be reserved within that time. :param timeout: The maximum number of seconds to wait. """ if timeout is None: cmd = b'reserve' else: cmd = b'reserve-with-timeout %d' % timeout return self._job_cmd(cmd, b'RESERVED')
python
def reserve(self, timeout: Optional[int] = None) -> Job: """Reserves a job from a tube on the watch list, giving this client exclusive access to it for the TTR. Returns the reserved job. This blocks until a job is reserved unless a ``timeout`` is given, which will raise a :class:`TimedOutError <greenstalk.TimedOutError>` if a job cannot be reserved within that time. :param timeout: The maximum number of seconds to wait. """ if timeout is None: cmd = b'reserve' else: cmd = b'reserve-with-timeout %d' % timeout return self._job_cmd(cmd, b'RESERVED')
[ "def", "reserve", "(", "self", ",", "timeout", ":", "Optional", "[", "int", "]", "=", "None", ")", "->", "Job", ":", "if", "timeout", "is", "None", ":", "cmd", "=", "b'reserve'", "else", ":", "cmd", "=", "b'reserve-with-timeout %d'", "%", "timeout", "return", "self", ".", "_job_cmd", "(", "cmd", ",", "b'RESERVED'", ")" ]
Reserves a job from a tube on the watch list, giving this client exclusive access to it for the TTR. Returns the reserved job. This blocks until a job is reserved unless a ``timeout`` is given, which will raise a :class:`TimedOutError <greenstalk.TimedOutError>` if a job cannot be reserved within that time. :param timeout: The maximum number of seconds to wait.
[ "Reserves", "a", "job", "from", "a", "tube", "on", "the", "watch", "list", "giving", "this", "client", "exclusive", "access", "to", "it", "for", "the", "TTR", ".", "Returns", "the", "reserved", "job", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L227-L241
train
Reserves a job from a tube on the watch list giving this client exclusive access to it. Returns the reserved job.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY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KIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + chr(802 - 751) + '\065' + chr(52), 40056 - 40048), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b110111) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b111 + 0o52) + chr(0b110111) + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(11900 - 11789) + chr(0b110001 + 0o1) + chr(356 - 308) + chr(862 - 813), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(570 - 519) + chr(55) + chr(0b10111 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(1856 - 1807) + chr(472 - 419), 0o10), nzTpIcepk0o8('\060' + chr(0b1101011 + 0o4) + '\063' + chr(50) + chr(0b100100 + 0o20), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(50) + chr(54), 9846 - 9838), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + '\063' + chr(0b100101 + 0o22) + chr(52), 55622 - 55614), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(49) + chr(54) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(9726 - 9615) + chr(0b110 + 0o55) + '\x32' + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(0b110100) + chr(0b111 + 0o60), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(0b110001) + chr(0b1 + 0o61) + '\x36', 63147 - 63139), nzTpIcepk0o8(chr(48) + chr(0b11100 + 0o123) + '\063' + chr(48) + chr(2147 - 2099), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1560 - 1511) + chr(0b11 + 0o55) + '\063', 54586 - 54578), nzTpIcepk0o8('\060' + chr(111) + chr(2080 - 2025) + '\064', 0b1000), nzTpIcepk0o8(chr(277 - 229) + chr(0b1101111) + '\061' + chr(0b100010 + 0o16) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(195 - 147) + chr(0b110010), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\061' + '\x32', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\063' + chr(0b110010) + chr(0b10010 + 0o45), 51901 - 51893), nzTpIcepk0o8('\060' + chr(0b11001 + 0o126) + chr(50) + '\x34' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + chr(2594 - 2543) + '\x33' + chr(0b110 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(8686 - 8575) + '\x31' + chr(55) + chr(50), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(1922 - 1873) + '\063' + chr(1766 - 1715), 0b1000), nzTpIcepk0o8('\060' + chr(7099 - 6988) + chr(54) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1526 - 1478) + chr(1453 - 1342) + chr(1839 - 1789) + chr(0b110110) + chr(55), 0b1000), nzTpIcepk0o8(chr(1057 - 1009) + chr(0b1101111) + chr(1740 - 1690) + '\x32' + chr(0b11011 + 0o26), 0o10), nzTpIcepk0o8('\x30' + chr(1922 - 1811) + chr(279 - 228) + chr(0b10101 + 0o35) + chr(1136 - 1082), 8), nzTpIcepk0o8('\x30' + chr(5887 - 5776) + '\x32' + '\x34' + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(1716 - 1667) + chr(0b110011) + '\x31', 0b1000), nzTpIcepk0o8(chr(1980 - 1932) + '\x6f' + chr(0b110001) + '\x31' + chr(0b110101), 8), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + '\063' + '\x30', 0o10), nzTpIcepk0o8(chr(2086 - 2038) + chr(0b1000100 + 0o53) + chr(50) + chr(51) + chr(52), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(0b101110 + 0o2) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110110) + '\x36', 56786 - 56778), nzTpIcepk0o8('\060' + chr(8901 - 8790) + '\062' + '\x31' + chr(0b11000 + 0o36), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(54) + chr(0b110111), 8), nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + chr(1015 - 964) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(52) + chr(568 - 514), 46976 - 46968), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110100) + '\x37', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(11749 - 11638) + '\x35' + chr(2016 - 1968), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc2'), chr(4568 - 4468) + chr(101) + chr(902 - 803) + chr(7252 - 7141) + chr(100) + chr(0b100110 + 0o77))('\165' + '\164' + chr(102) + chr(712 - 667) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def lSSFxaKqJ6Kv(hXMPsSrOQzbh, ACACUUFQsMpr=None) -> CGcD9mbDELE8: if ACACUUFQsMpr is None: mD44XHfr1PSC = ES5oEprVxulp(b'\x9e\x1f\x08\xe4\x88;\xb1') else: mD44XHfr1PSC = ES5oEprVxulp(b"\x9e\x1f\x08\xe4\x88;\xb1\xfb\x8b\x1c\xa4O{\xb4*Q'-\xbf\xa3\x83\xfe\x1e") % ACACUUFQsMpr return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb3\x10\x14\xe3\xa5.\xb9\xb2'), '\144' + chr(0b1001100 + 0o31) + '\143' + '\157' + chr(0b1100100) + chr(101))(chr(10152 - 10035) + chr(116) + chr(4539 - 4437) + chr(173 - 128) + chr(0b111000)))(mD44XHfr1PSC, ES5oEprVxulp(b'\xbe?(\xc4\xa8\x1b\x91\x92'))
mayhewj/greenstalk
greenstalk.py
Client.delete
def delete(self, job: JobOrID) -> None: """Deletes a job. :param job: The job or job ID to delete. """ self._send_cmd(b'delete %d' % _to_id(job), b'DELETED')
python
def delete(self, job: JobOrID) -> None: """Deletes a job. :param job: The job or job ID to delete. """ self._send_cmd(b'delete %d' % _to_id(job), b'DELETED')
[ "def", "delete", "(", "self", ",", "job", ":", "JobOrID", ")", "->", "None", ":", "self", ".", "_send_cmd", "(", "b'delete %d'", "%", "_to_id", "(", "job", ")", ",", "b'DELETED'", ")" ]
Deletes a job. :param job: The job or job ID to delete.
[ "Deletes", "a", "job", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L243-L248
train
Deletes a job.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fP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7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + '\061' + '\061' + chr(54), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101110 + 0o5) + chr(0b110001) + '\x36', 34996 - 34988), nzTpIcepk0o8('\060' + chr(10198 - 10087) + '\063' + '\x32' + chr(681 - 630), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b1101 + 0o47) + chr(0b11000 + 0o34), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(1508 - 1455) + chr(0b1010 + 0o55), 0o10), nzTpIcepk0o8(chr(1480 - 1432) + '\x6f' + '\063' + chr(54) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3237 - 3126) + chr(0b110010) + '\064' + '\060', 0b1000), nzTpIcepk0o8(chr(1764 - 1716) + '\x6f' + chr(0b101010 + 0o7) + '\x33' + chr(49), 13749 - 13741), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(1718 - 1667) + chr(230 - 178) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b110101) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(49) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(55) + chr(0b100011 + 0o15), 53523 - 53515), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\066' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1461 - 1411) + chr(498 - 445) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(52) + chr(709 - 658), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(787 - 737) + chr(0b11001 + 0o33) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101100 + 0o6) + chr(0b11101 + 0o31), 51906 - 51898), nzTpIcepk0o8(chr(672 - 624) + chr(111) + '\x32' + '\x37' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(10673 - 10562) + chr(1677 - 1627) + chr(48) + chr(0b101111 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(1066 - 1018) + '\157' + chr(0b110011) + chr(0b101 + 0o61) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x32' + '\x30', 0b1000), nzTpIcepk0o8(chr(1338 - 1290) + '\x6f' + chr(0b10000 + 0o41) + chr(0b11100 + 0o26) + '\x30', 0b1000), nzTpIcepk0o8(chr(996 - 948) + '\x6f' + '\063' + chr(49) + chr(0b110010), 57982 - 57974), nzTpIcepk0o8('\060' + '\157' + '\064' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(49) + '\x37' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101011 + 0o10) + chr(0b101001 + 0o14) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1000110 + 0o51) + chr(0b110010) + chr(1045 - 996) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101011 + 0o6) + chr(0b110010) + chr(0b110 + 0o53), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\064' + '\067', 16847 - 16839), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + '\x31' + '\x37' + chr(0b110101), 23542 - 23534), nzTpIcepk0o8(chr(48) + chr(4390 - 4279) + chr(49) + chr(0b110111) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(11987 - 11876) + '\062' + chr(1898 - 1849) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(725 - 614) + chr(2373 - 2323) + chr(0b1000 + 0o53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + '\063' + '\064' + '\061', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(49) + chr(49) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(650 - 599) + chr(0b110100) + '\065', 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b110011) + chr(51) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x33' + '\065', 28278 - 28270), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + chr(0b110010) + chr(2000 - 1947) + chr(0b110100), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(2374 - 2321) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'`'), '\144' + chr(8787 - 8686) + chr(99) + chr(6648 - 6537) + chr(0b1100100) + chr(0b101001 + 0o74))(chr(0b1110101) + chr(116) + chr(0b100 + 0o142) + chr(252 - 207) + chr(0b10000 + 0o50)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def gNQxGQmbJXBt(hXMPsSrOQzbh, pDuVZERs4dR8) -> None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x11\xbd\xb6e\x00\xb0\x95\xcd='), '\x64' + chr(0b1100101) + chr(0b1100010 + 0o1) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(6545 - 6429) + '\x66' + chr(812 - 767) + chr(0b101010 + 0o16)))(ES5oEprVxulp(b'*\xab\xbfn\x10\x8a\xd6\x85=') % ZvCOeEzA6eww(pDuVZERs4dR8), ES5oEprVxulp(b'\n\x8b\x9fN0\xaa\xb2'))
mayhewj/greenstalk
greenstalk.py
Client.release
def release(self, job: Job, priority: int = DEFAULT_PRIORITY, delay: int = DEFAULT_DELAY) -> None: """Releases a reserved job. :param job: The job to release. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. :param delay: The number of seconds to delay the job for. """ self._send_cmd(b'release %d %d %d' % (job.id, priority, delay), b'RELEASED')
python
def release(self, job: Job, priority: int = DEFAULT_PRIORITY, delay: int = DEFAULT_DELAY) -> None: """Releases a reserved job. :param job: The job to release. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. :param delay: The number of seconds to delay the job for. """ self._send_cmd(b'release %d %d %d' % (job.id, priority, delay), b'RELEASED')
[ "def", "release", "(", "self", ",", "job", ":", "Job", ",", "priority", ":", "int", "=", "DEFAULT_PRIORITY", ",", "delay", ":", "int", "=", "DEFAULT_DELAY", ")", "->", "None", ":", "self", ".", "_send_cmd", "(", "b'release %d %d %d'", "%", "(", "job", ".", "id", ",", "priority", ",", "delay", ")", ",", "b'RELEASED'", ")" ]
Releases a reserved job. :param job: The job to release. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. :param delay: The number of seconds to delay the job for.
[ "Releases", "a", "reserved", "job", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L250-L261
train
Releases a reserved job.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5D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zpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(7736 - 7625) + chr(0b100000 + 0o21) + '\067' + chr(0b101001 + 0o13), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(508 - 459) + chr(49), 0b1000), nzTpIcepk0o8(chr(891 - 843) + chr(0b10 + 0o155) + chr(0b101111 + 0o2) + chr(54) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b110 + 0o151) + chr(0b110010) + chr(0b110110) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(2145 - 2093) + chr(1354 - 1304), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b101011 + 0o7), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(2111 - 2062) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + chr(0b1011 + 0o50) + chr(0b110010) + chr(0b11001 + 0o33), 10126 - 10118), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\x36' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110110) + chr(881 - 831), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2120 - 2069) + chr(52) + '\066', 0o10), nzTpIcepk0o8(chr(1854 - 1806) + '\x6f' + chr(0b100001 + 0o22) + chr(0b110001 + 0o1) + chr(2440 - 2386), 0b1000), nzTpIcepk0o8('\060' + chr(11805 - 11694) + chr(0b110001) + '\x32' + '\061', 34440 - 34432), nzTpIcepk0o8('\060' + chr(6819 - 6708) + chr(49) + chr(0b110 + 0o56) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x34' + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + '\062' + chr(478 - 427) + '\x31', 19309 - 19301), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(2141 - 2092) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b110011) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(55) + chr(0b101100 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(375 - 321) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1111 + 0o140) + chr(0b110011) + chr(53) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10100 + 0o37) + chr(0b110011) + chr(1695 - 1646), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b110000) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1196 - 1148) + '\157' + chr(1177 - 1126) + chr(0b100011 + 0o20) + '\062', 31385 - 31377), nzTpIcepk0o8('\060' + '\x6f' + chr(52) + chr(298 - 248), 48021 - 48013), nzTpIcepk0o8(chr(472 - 424) + chr(8315 - 8204) + '\067' + chr(2130 - 2078), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(0b110111), 33715 - 33707), nzTpIcepk0o8(chr(1730 - 1682) + chr(111) + chr(212 - 163) + chr(940 - 891) + chr(1702 - 1651), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\067' + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b100100 + 0o20) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b101 + 0o56) + chr(0b110001), 8), nzTpIcepk0o8(chr(1155 - 1107) + '\x6f' + chr(50) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(55) + '\x36', 0o10), nzTpIcepk0o8(chr(1738 - 1690) + chr(111) + chr(0b110101) + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(1514 - 1403) + '\063' + chr(53) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(572 - 461) + chr(49) + chr(0b110111) + '\x34', 8), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(50) + chr(49) + chr(613 - 562), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(432 - 381) + chr(2210 - 2159) + chr(1946 - 1891), ord("\x08")), nzTpIcepk0o8(chr(1157 - 1109) + '\x6f' + chr(50) + chr(0b110000) + chr(0b110000), 43132 - 43124), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + '\061' + chr(2068 - 2016) + chr(0b110101), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2692 - 2639) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'R'), chr(7573 - 7473) + '\x65' + chr(99) + '\157' + chr(2684 - 2584) + '\145')(chr(117) + chr(116) + chr(7860 - 7758) + '\055' + chr(0b1 + 0o67)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def aUHj5BkBa9ON(hXMPsSrOQzbh, pDuVZERs4dR8, NDRX1L7ZRZ6p=fn4I8xM4Mv_P, At656iyyS8xP=UjjTHDcdF1qg) -> None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'#z\x15\xda\xc6M\xe9\xb9\xd3'), chr(100) + '\145' + chr(487 - 388) + chr(305 - 194) + chr(100) + '\145')(chr(1610 - 1493) + chr(0b1110100) + '\x66' + '\055' + chr(0b100010 + 0o26)))(ES5oEprVxulp(b'\x0el\x1c\xd1\xc3a\xef\xf4\x92V\xc6\xf35@\x02\xfd') % (roI3spqORKae(pDuVZERs4dR8, roI3spqORKae(ES5oEprVxulp(b'\x11h<\xda\xeeu\xb2\x9b\x82H\xb6\x82'), chr(100) + '\145' + chr(7744 - 7645) + chr(111) + chr(0b1111 + 0o125) + chr(0b100100 + 0o101))(chr(10736 - 10619) + '\164' + chr(1207 - 1105) + chr(0b101101) + '\x38')), NDRX1L7ZRZ6p, At656iyyS8xP), ES5oEprVxulp(b'.L<\xf1\xe3A\xcf\x90'))
mayhewj/greenstalk
greenstalk.py
Client.bury
def bury(self, job: Job, priority: int = DEFAULT_PRIORITY) -> None: """Buries a reserved job. :param job: The job to bury. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. """ self._send_cmd(b'bury %d %d' % (job.id, priority), b'BURIED')
python
def bury(self, job: Job, priority: int = DEFAULT_PRIORITY) -> None: """Buries a reserved job. :param job: The job to bury. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent. """ self._send_cmd(b'bury %d %d' % (job.id, priority), b'BURIED')
[ "def", "bury", "(", "self", ",", "job", ":", "Job", ",", "priority", ":", "int", "=", "DEFAULT_PRIORITY", ")", "->", "None", ":", "self", ".", "_send_cmd", "(", "b'bury %d %d'", "%", "(", "job", ".", "id", ",", "priority", ")", ",", "b'BURIED'", ")" ]
Buries a reserved job. :param job: The job to bury. :param priority: An integer between 0 and 4,294,967,295 where 0 is the most urgent.
[ "Buries", "a", "reserved", "job", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L263-L270
train
Bury a reserved job.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZ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D,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1001 + 0o146) + chr(0b10010 + 0o40) + chr(53) + chr(695 - 642), 26137 - 26129), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b110010) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + chr(0b100 + 0o56) + chr(2098 - 2044) + chr(0b110101), 10694 - 10686), nzTpIcepk0o8(chr(899 - 851) + chr(0b1010001 + 0o36) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(7891 - 7780) + '\x31' + '\062' + chr(1465 - 1411), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x37' + chr(0b100 + 0o60), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4023 - 3912) + chr(0b110011) + chr(55) + '\064', 0o10), nzTpIcepk0o8(chr(336 - 288) + '\157' + chr(975 - 925) + chr(212 - 158) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111 + 0o150) + chr(51) + chr(0b110010 + 0o4) + '\067', 12457 - 12449), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(821 - 771) + '\x33' + chr(831 - 783), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4870 - 4759) + '\062' + chr(0b110100) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(10547 - 10436) + chr(518 - 467) + chr(53) + chr(0b110110), 41102 - 41094), nzTpIcepk0o8(chr(479 - 431) + chr(0b1101111) + '\062' + chr(2571 - 2519) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1154 - 1104) + '\066' + chr(54), 8), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\063' + chr(0b100101 + 0o15) + chr(0b1 + 0o62), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\061' + '\x32', 20063 - 20055), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110110) + chr(1293 - 1242), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(52) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(0b101101 + 0o4) + chr(0b110111) + chr(207 - 155), ord("\x08")), nzTpIcepk0o8(chr(986 - 938) + chr(111) + chr(0b10001 + 0o41) + chr(52) + chr(1117 - 1067), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + chr(50) + chr(0b110011) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(4384 - 4273) + chr(50) + '\x36' + chr(0b11100 + 0o24), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1957 - 1908) + '\061' + chr(1916 - 1864), 0b1000), nzTpIcepk0o8(chr(105 - 57) + chr(0b111001 + 0o66) + chr(0b100010 + 0o17) + chr(1657 - 1606), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\x30' + chr(0b100111 + 0o13), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(54) + '\x33', 19639 - 19631), nzTpIcepk0o8('\060' + chr(0b11001 + 0o126) + chr(0b10011 + 0o44) + chr(0b101011 + 0o5), 0b1000), nzTpIcepk0o8(chr(48) + chr(848 - 737) + chr(51) + chr(0b11001 + 0o31) + chr(55), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10011 + 0o37) + '\x36' + '\x35', 8), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b11000 + 0o31) + chr(80 - 26), ord("\x08")), nzTpIcepk0o8(chr(1146 - 1098) + chr(111) + '\x32' + chr(55) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(0b0 + 0o61) + '\062' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(52) + chr(0b10110 + 0o37), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110110) + chr(51), 8), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(2744 - 2689) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + '\063' + chr(0b100110 + 0o12) + chr(0b110111), 42112 - 42104), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\x37' + '\066', 62168 - 62160), nzTpIcepk0o8(chr(1010 - 962) + chr(111) + chr(0b110001) + '\062' + chr(0b1010 + 0o50), 29172 - 29164), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\064', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(5468 - 5357) + chr(0b100100 + 0o21) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x83'), '\144' + chr(101) + '\143' + chr(0b1100110 + 0o11) + chr(100) + chr(0b1100101))(chr(117) + chr(2504 - 2388) + '\x66' + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def bVw7TwaSmZYy(hXMPsSrOQzbh, pDuVZERs4dR8, NDRX1L7ZRZ6p=fn4I8xM4Mv_P) -> None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf2\xa4\xd0m2cm\x91\xd2'), chr(0b10101 + 0o117) + chr(0b1100101) + chr(3681 - 3582) + chr(10479 - 10368) + chr(0b1100100) + '\x65')(chr(0b110 + 0o157) + chr(0b1110010 + 0o2) + '\x66' + '\055' + chr(56)))(ES5oEprVxulp(b'\xcf\xa2\xc7zv\x19j\xdc\x93\x93') % (roI3spqORKae(pDuVZERs4dR8, roI3spqORKae(ES5oEprVxulp(b'\xc0\xb6\xf9m\x1a[6\xb3\x83\x8d\xc8\xf5'), '\144' + chr(101) + chr(0b100011 + 0o100) + chr(111) + chr(100) + '\145')('\x75' + '\x74' + chr(102) + chr(45) + '\070')), NDRX1L7ZRZ6p), ES5oEprVxulp(b'\xef\x82\xe7J\x13x'))
mayhewj/greenstalk
greenstalk.py
Client.touch
def touch(self, job: Job) -> None: """Refreshes the TTR of a reserved job. :param job: The job to touch. """ self._send_cmd(b'touch %d' % job.id, b'TOUCHED')
python
def touch(self, job: Job) -> None: """Refreshes the TTR of a reserved job. :param job: The job to touch. """ self._send_cmd(b'touch %d' % job.id, b'TOUCHED')
[ "def", "touch", "(", "self", ",", "job", ":", "Job", ")", "->", "None", ":", "self", ".", "_send_cmd", "(", "b'touch %d'", "%", "job", ".", "id", ",", "b'TOUCHED'", ")" ]
Refreshes the TTR of a reserved job. :param job: The job to touch.
[ "Refreshes", "the", "TTR", "of", "a", "reserved", "job", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L272-L277
train
Refreshes the TTR of a reserved job.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_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zZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1011 + 0o46) + '\062' + chr(0b101001 + 0o13), 0o10), nzTpIcepk0o8('\060' + chr(0b111111 + 0o60) + '\x32' + chr(1757 - 1702) + chr(50), 56466 - 56458), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100001 + 0o20) + chr(0b1001 + 0o54) + chr(49), 27345 - 27337), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(52) + chr(0b1110 + 0o43), 0o10), nzTpIcepk0o8(chr(183 - 135) + chr(7891 - 7780) + '\064' + chr(0b101111 + 0o7), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10110 + 0o34) + chr(0b110 + 0o60) + chr(48), 0b1000), nzTpIcepk0o8(chr(342 - 294) + '\157' + chr(683 - 634) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(8456 - 8345) + chr(0b0 + 0o61) + chr(601 - 551) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(826 - 775) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x36' + '\063', 0b1000), nzTpIcepk0o8(chr(1549 - 1501) + '\157' + chr(0b101 + 0o56) + chr(55) + chr(0b10001 + 0o41), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11000 + 0o33) + chr(0b110100) + chr(214 - 166), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\065' + chr(2196 - 2142), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10011 + 0o40) + chr(162 - 110) + '\064', 19716 - 19708), nzTpIcepk0o8(chr(1679 - 1631) + '\x6f' + chr(1430 - 1380) + '\066' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(190 - 79) + chr(0b110001) + '\x37' + chr(0b11101 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + '\063' + chr(2749 - 2694) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2160 - 2110) + '\x35' + '\x30', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(1604 - 1553) + chr(470 - 419) + chr(0b100110 + 0o13), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110101) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(1804 - 1749) + chr(50), 34326 - 34318), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + '\067' + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(10343 - 10232) + chr(0b110010) + chr(55) + '\062', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1001 + 0o50) + chr(53), 0b1000), nzTpIcepk0o8(chr(148 - 100) + chr(1631 - 1520) + '\x31', 60551 - 60543), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b100000 + 0o23) + '\x33' + chr(0b110100), 24914 - 24906), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100011 + 0o20) + chr(2033 - 1981) + chr(0b100101 + 0o14), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(1672 - 1618) + chr(0b110011), 50446 - 50438), nzTpIcepk0o8(chr(48) + chr(10433 - 10322) + chr(0b10010 + 0o40) + chr(2350 - 2295), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\060', 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b11001 + 0o126) + chr(0b100110 + 0o14) + '\060' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\x37' + chr(2127 - 2076), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(0b11110 + 0o23) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(3243 - 3132) + '\063' + chr(0b10011 + 0o37) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1 + 0o65) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100010 + 0o20) + chr(0b10 + 0o65) + chr(53), 57604 - 57596), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + '\066' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(9875 - 9764) + '\061' + chr(51) + chr(1747 - 1696), 0o10), nzTpIcepk0o8(chr(58 - 10) + chr(1609 - 1498) + '\x31' + chr(0b10010 + 0o41) + chr(0b1111 + 0o43), 36056 - 36048), nzTpIcepk0o8(chr(74 - 26) + chr(12061 - 11950) + chr(1193 - 1143) + chr(0b110101) + '\x33', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(3996 - 3885) + '\x35' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'z'), chr(0b1100100) + chr(0b101010 + 0o73) + chr(99) + chr(3948 - 3837) + chr(9933 - 9833) + chr(0b1001111 + 0o26))('\165' + chr(116) + chr(0b1100110) + chr(1735 - 1690) + chr(2711 - 2655)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def OastqfB7fmkI(hXMPsSrOQzbh, pDuVZERs4dR8) -> None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0b\xc9\x0c\xcfB\xefk8~'), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(0b1100 + 0o130) + '\x65')(chr(13037 - 12920) + chr(0b110001 + 0o103) + chr(0b1100110) + chr(0b101010 + 0o3) + chr(56)))(ES5oEprVxulp(b' \xd5\x1c\xc2N\x90-1') % roI3spqORKae(pDuVZERs4dR8, roI3spqORKae(ES5oEprVxulp(b'9\xdb%\xcfj\xd70\x1a/I\xaa\xb4'), chr(100) + chr(101) + '\143' + chr(5429 - 5318) + '\144' + '\x65')(chr(0b1101001 + 0o14) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\x38')), ES5oEprVxulp(b'\x00\xf5<\xe2n\xf5L'))
mayhewj/greenstalk
greenstalk.py
Client.watch
def watch(self, tube: str) -> int: """Adds a tube to the watch list. Returns the number of tubes this client is watching. :param tube: The tube to watch. """ return self._int_cmd(b'watch %b' % tube.encode('ascii'), b'WATCHING')
python
def watch(self, tube: str) -> int: """Adds a tube to the watch list. Returns the number of tubes this client is watching. :param tube: The tube to watch. """ return self._int_cmd(b'watch %b' % tube.encode('ascii'), b'WATCHING')
[ "def", "watch", "(", "self", ",", "tube", ":", "str", ")", "->", "int", ":", "return", "self", ".", "_int_cmd", "(", "b'watch %b'", "%", "tube", ".", "encode", "(", "'ascii'", ")", ",", "b'WATCHING'", ")" ]
Adds a tube to the watch list. Returns the number of tubes this client is watching. :param tube: The tube to watch.
[ "Adds", "a", "tube", "to", "the", "watch", "list", ".", "Returns", "the", "number", "of", "tubes", "this", "client", "is", "watching", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L279-L285
train
Adds a tube to the watch list. Returns the number of tubes this client is watching.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988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NA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\063' + '\x36', 23677 - 23669), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + '\063' + chr(51), 46113 - 46105), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(1448 - 1400) + '\066', 34244 - 34236), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11110 + 0o23) + chr(53 - 5) + chr(0b100000 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b110010) + '\067' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(214 - 166) + '\157' + '\063' + '\065' + '\067', 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(4796 - 4685) + chr(1963 - 1914) + chr(0b1010 + 0o46) + chr(0b10000 + 0o41), 55234 - 55226), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\064' + chr(1312 - 1261), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + '\x32' + chr(51) + chr(0b11 + 0o64), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(50) + chr(571 - 517) + '\x36', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\067' + chr(50), 4307 - 4299), nzTpIcepk0o8('\060' + chr(11912 - 11801) + chr(50) + chr(54) + chr(475 - 420), ord("\x08")), nzTpIcepk0o8(chr(551 - 503) + chr(7392 - 7281) + chr(2116 - 2065) + '\067' + chr(1490 - 1436), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b11111 + 0o24) + '\x34' + chr(852 - 798), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110011), 8), nzTpIcepk0o8('\x30' + chr(7302 - 7191) + '\x35' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + '\062' + chr(0b101011 + 0o11) + chr(148 - 100), 21734 - 21726), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1010111 + 0o30) + '\062' + chr(0b110100) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + '\061' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(0b100000 + 0o117) + chr(0b110010) + '\062' + chr(72 - 21), 28797 - 28789), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b101011 + 0o12) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110110) + chr(0b1001 + 0o52), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\x37' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(945 - 895) + '\064', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\x32' + '\061' + chr(1457 - 1403), 0b1000), nzTpIcepk0o8(chr(2128 - 2080) + chr(0b1101111) + chr(2278 - 2229) + chr(1676 - 1621) + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(49), 0b1000), nzTpIcepk0o8(chr(1713 - 1665) + '\157' + '\x33' + '\x36' + chr(0b11000 + 0o33), 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + '\x31' + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(744 - 690) + '\x31', 45944 - 45936), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + '\x36' + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(510 - 460) + chr(0b100 + 0o55), 19983 - 19975), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(10550 - 10439) + '\066' + chr(54), 8), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\065' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b110110) + chr(0b0 + 0o65), 0o10), nzTpIcepk0o8(chr(584 - 536) + chr(111) + chr(942 - 892), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(0b110001) + chr(0b110011) + chr(1882 - 1832), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\062' + '\066' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b110001) + chr(0b10010 + 0o37) + chr(0b110111), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101001 + 0o14) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb0'), chr(0b1100100) + chr(101) + chr(5139 - 5040) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + chr(12467 - 12351) + chr(0b1010011 + 0o23) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dtfXUYjscSJ4(hXMPsSrOQzbh, c3RFlT7QzD8_) -> nzTpIcepk0o8: return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc1r\xe87\xe7\x8c,\xc7'), chr(100) + chr(0b1010100 + 0o21) + '\143' + '\x6f' + chr(0b1000 + 0o134) + chr(0b1100101))('\165' + '\164' + chr(0b1010111 + 0o17) + '\x2d' + chr(56)))(ES5oEprVxulp(b'\xe9z\xf2 \xd0\xcfd\xc1') % roI3spqORKae(c3RFlT7QzD8_, roI3spqORKae(ES5oEprVxulp(b'\xc7j\xcf"\xea\xa9\'\xc6\xf0\x82\xb2\xd6'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(5331 - 5230))('\165' + chr(10594 - 10478) + chr(102) + chr(1747 - 1702) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xffh\xe5*\xd1'), chr(0b1100100) + chr(3963 - 3862) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')(chr(5559 - 5442) + chr(0b1110100) + '\146' + chr(45) + '\x38')), ES5oEprVxulp(b'\xc9Z\xd2\x00\xf0\xa6\x0f\xe4'))
mayhewj/greenstalk
greenstalk.py
Client.ignore
def ignore(self, tube: str) -> int: """Removes a tube from the watch list. Returns the number of tubes this client is watching. :param tube: The tube to ignore. """ return self._int_cmd(b'ignore %b' % tube.encode('ascii'), b'WATCHING')
python
def ignore(self, tube: str) -> int: """Removes a tube from the watch list. Returns the number of tubes this client is watching. :param tube: The tube to ignore. """ return self._int_cmd(b'ignore %b' % tube.encode('ascii'), b'WATCHING')
[ "def", "ignore", "(", "self", ",", "tube", ":", "str", ")", "->", "int", ":", "return", "self", ".", "_int_cmd", "(", "b'ignore %b'", "%", "tube", ".", "encode", "(", "'ascii'", ")", ",", "b'WATCHING'", ")" ]
Removes a tube from the watch list. Returns the number of tubes this client is watching. :param tube: The tube to ignore.
[ "Removes", "a", "tube", "from", "the", "watch", "list", ".", "Returns", "the", "number", "of", "tubes", "this", "client", "is", "watching", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L287-L293
train
Removes a tube from the watch list. Returns the number of tubes this client is watching.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFG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4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(78 - 30) + chr(0b111110 + 0o61) + chr(1690 - 1640) + chr(51) + '\065', 6110 - 6102), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(7647 - 7536) + '\x32' + '\x36' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(11450 - 11339) + '\x31' + '\065' + chr(0b1101 + 0o46), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1669 - 1618) + '\x32' + chr(1908 - 1859), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(0b101101 + 0o5) + '\063' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + '\063' + '\x31' + chr(49), 34716 - 34708), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(1599 - 1488) + chr(0b1000 + 0o51) + chr(0b110001) + chr(0b100 + 0o60), 0o10), nzTpIcepk0o8(chr(953 - 905) + chr(111) + chr(49) + '\063' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(0b110110) + chr(0b101101 + 0o11), 0o10), nzTpIcepk0o8('\060' + chr(10218 - 10107) + chr(2354 - 2304) + '\060' + '\063', 19016 - 19008), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1059 - 1008) + chr(1163 - 1110) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(50) + '\063' + chr(0b110101), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\x32' + '\x30', 65216 - 65208), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1011111 + 0o20) + chr(2171 - 2122) + chr(1304 - 1255) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(52) + '\060', 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b110110 + 0o0) + '\x30', 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b111111 + 0o60) + '\062' + '\x30' + '\062', ord("\x08")), nzTpIcepk0o8(chr(1649 - 1601) + chr(0b1111 + 0o140) + chr(837 - 786) + chr(0b110111) + chr(1862 - 1814), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4571 - 4460) + chr(0b110010) + chr(0b110000) + chr(0b10010 + 0o44), 0b1000), nzTpIcepk0o8(chr(310 - 262) + '\157' + '\x32' + chr(0b101010 + 0o14) + chr(755 - 701), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11 + 0o60) + chr(0b110001) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11100 + 0o123) + '\x32' + chr(2804 - 2749) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110101) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(419 - 370) + chr(719 - 669), 4815 - 4807), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(2439 - 2388) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(2544 - 2433) + chr(0b110100) + chr(51), 20040 - 20032), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\x33' + chr(0b101100 + 0o13), 8), nzTpIcepk0o8(chr(1698 - 1650) + chr(0b1101111) + '\x32' + '\066' + chr(0b110111), 13023 - 13015), nzTpIcepk0o8(chr(1401 - 1353) + '\157' + chr(49) + '\x35' + '\x31', 45337 - 45329), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110011) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100101 + 0o16) + chr(0b110011), 4279 - 4271), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + '\061' + '\x30' + chr(596 - 547), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(503 - 451) + chr(1413 - 1363), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11979 - 11868) + chr(2133 - 2082) + '\x36' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\x31' + chr(53), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\065' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + chr(0b110011) + chr(0b110100) + '\060', 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\063' + '\x35' + chr(54), 8), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(50) + chr(0b11000 + 0o31) + chr(0b10101 + 0o36), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(2580 - 2529) + chr(1226 - 1171) + '\x32', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(213 - 160) + chr(0b110000), 60031 - 60023)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb3'), '\144' + '\145' + '\x63' + chr(3819 - 3708) + '\144' + chr(101))('\x75' + chr(116) + '\x66' + '\x2d' + chr(1858 - 1802)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def NTpppS5XYPvK(hXMPsSrOQzbh, c3RFlT7QzD8_) -> nzTpIcepk0o8: return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc2\xdd\x05\xa5\xc5\xaa!;'), '\144' + chr(8390 - 8289) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b100 + 0o160) + '\x66' + '\x2d' + chr(56)))(ES5oEprVxulp(b'\xf4\xd3\x05\xbe\xe8\xaclzT') % roI3spqORKae(c3RFlT7QzD8_, roI3spqORKae(ES5oEprVxulp(b'\xc4\xc5"\xb0\xc8\x8f*:Y\xb7\xa6\xfc'), chr(0b1000001 + 0o43) + chr(6787 - 6686) + '\x63' + chr(111) + chr(293 - 193) + '\145')(chr(0b1110101) + '\x74' + '\146' + chr(278 - 233) + chr(1016 - 960)))(roI3spqORKae(ES5oEprVxulp(b'\xfc\xc7\x08\xb8\xf3'), chr(100) + '\145' + chr(0b1010000 + 0o23) + chr(0b1101111) + chr(7954 - 7854) + chr(0b1100101 + 0o0))(chr(117) + '\164' + '\146' + chr(45) + chr(56))), ES5oEprVxulp(b'\xca\xf5?\x92\xd2\x80\x02\x18'))
mayhewj/greenstalk
greenstalk.py
Client.kick
def kick(self, bound: int) -> int: """Moves delayed and buried jobs into the ready queue and returns the number of jobs effected. Only jobs from the currently used tube are moved. A kick will only move jobs in a single state. If there are any buried jobs, only those will be moved. Otherwise delayed jobs will be moved. :param bound: The maximum number of jobs to kick. """ return self._int_cmd(b'kick %d' % bound, b'KICKED')
python
def kick(self, bound: int) -> int: """Moves delayed and buried jobs into the ready queue and returns the number of jobs effected. Only jobs from the currently used tube are moved. A kick will only move jobs in a single state. If there are any buried jobs, only those will be moved. Otherwise delayed jobs will be moved. :param bound: The maximum number of jobs to kick. """ return self._int_cmd(b'kick %d' % bound, b'KICKED')
[ "def", "kick", "(", "self", ",", "bound", ":", "int", ")", "->", "int", ":", "return", "self", ".", "_int_cmd", "(", "b'kick %d'", "%", "bound", ",", "b'KICKED'", ")" ]
Moves delayed and buried jobs into the ready queue and returns the number of jobs effected. Only jobs from the currently used tube are moved. A kick will only move jobs in a single state. If there are any buried jobs, only those will be moved. Otherwise delayed jobs will be moved. :param bound: The maximum number of jobs to kick.
[ "Moves", "delayed", "and", "buried", "jobs", "into", "the", "ready", "queue", "and", "returns", "the", "number", "of", "jobs", "effected", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L314-L325
train
Moves delayed and buried jobs into the ready queue and returns the number of jobs effected.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxRO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N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + chr(0b11000 + 0o33) + chr(50) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b1100 + 0o50), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\067' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\063' + chr(850 - 797), ord("\x08")), nzTpIcepk0o8(chr(1998 - 1950) + chr(11265 - 11154) + chr(2227 - 2177) + chr(0b110100) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(690 - 642) + '\157' + chr(0b110011) + chr(0b110110) + chr(0b110011), 4995 - 4987), nzTpIcepk0o8(chr(524 - 476) + chr(9628 - 9517) + chr(0b110100 + 0o1) + chr(48), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10010 + 0o37) + chr(0b110011) + chr(0b11100 + 0o30), 2077 - 2069), nzTpIcepk0o8('\060' + chr(0b1010001 + 0o36) + chr(0b1 + 0o60) + '\065' + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110 + 0o151) + '\062' + chr(0b110100) + chr(55), 0o10), nzTpIcepk0o8(chr(2116 - 2068) + chr(111) + chr(51) + chr(48) + chr(1751 - 1702), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x36' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101001 + 0o10) + chr(0b110001) + chr(54), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b11001 + 0o126) + chr(51) + chr(0b1100 + 0o45), 25071 - 25063), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b10000 + 0o46), 0o10), nzTpIcepk0o8(chr(1483 - 1435) + chr(111) + '\x32' + chr(0b11 + 0o55) + chr(0b100001 + 0o24), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11000 + 0o36) + chr(0b11001 + 0o32), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(12166 - 12055) + chr(54) + '\x31', 6566 - 6558), nzTpIcepk0o8(chr(2072 - 2024) + '\x6f' + chr(1046 - 995) + '\065' + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(10637 - 10526) + chr(49) + chr(51) + chr(49), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(0b1110 + 0o46) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6564 - 6453) + chr(0b100100 + 0o15) + '\x31' + chr(0b10010 + 0o44), 8), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(491 - 437) + chr(48), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(50) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(52) + chr(0b101 + 0o56), 48913 - 48905), nzTpIcepk0o8(chr(586 - 538) + chr(0b1101111) + chr(1034 - 985) + '\x36' + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(3962 - 3851) + chr(0b110001) + chr(1012 - 957) + chr(1454 - 1401), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\067' + chr(0b10101 + 0o36), 23351 - 23343), nzTpIcepk0o8('\060' + chr(4824 - 4713) + chr(0b110001 + 0o2) + chr(55), 1968 - 1960), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(50) + chr(1332 - 1279), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100000 + 0o22) + '\063' + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\064' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(4341 - 4230) + chr(2097 - 2047) + '\x32' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + chr(0b11100 + 0o25) + '\065' + chr(2569 - 2515), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b111 + 0o57), 10497 - 10489), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\x32' + '\x30' + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(9963 - 9852) + chr(0b110011) + chr(0b1001 + 0o47) + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(2038 - 1927) + '\063' + '\x33' + chr(773 - 719), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\064' + chr(2177 - 2126), 0o10), nzTpIcepk0o8(chr(48) + chr(1719 - 1608) + '\065' + '\x30', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfd'), chr(894 - 794) + chr(101) + chr(99) + chr(0b1000111 + 0o50) + chr(0b11110 + 0o106) + chr(0b1000101 + 0o40))(chr(117) + '\164' + chr(102) + chr(0b101101) + chr(1296 - 1240)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def NJgqD167WwOs(hXMPsSrOQzbh, qR1Yu6tJYVhg) -> nzTpIcepk0o8: return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x8ce\x93\xa9\xfe\x90E8'), chr(0b1000000 + 0o44) + chr(101) + chr(99) + chr(0b10011 + 0o134) + chr(100) + '\145')(chr(10910 - 10793) + '\x74' + chr(0b1001101 + 0o31) + chr(1450 - 1405) + chr(0b111000)))(ES5oEprVxulp(b'\xb8e\x9e\xb6\x81\xd6L') % qR1Yu6tJYVhg, ES5oEprVxulp(b'\x98E\xbe\x96\xe4\xb7'))
mayhewj/greenstalk
greenstalk.py
Client.kick_job
def kick_job(self, job: JobOrID) -> None: """Moves a delayed or buried job into the ready queue. :param job: The job or job ID to kick. """ self._send_cmd(b'kick-job %d' % _to_id(job), b'KICKED')
python
def kick_job(self, job: JobOrID) -> None: """Moves a delayed or buried job into the ready queue. :param job: The job or job ID to kick. """ self._send_cmd(b'kick-job %d' % _to_id(job), b'KICKED')
[ "def", "kick_job", "(", "self", ",", "job", ":", "JobOrID", ")", "->", "None", ":", "self", ".", "_send_cmd", "(", "b'kick-job %d'", "%", "_to_id", "(", "job", ")", ",", "b'KICKED'", ")" ]
Moves a delayed or buried job into the ready queue. :param job: The job or job ID to kick.
[ "Moves", "a", "delayed", "or", "buried", "job", "into", "the", "ready", "queue", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L327-L332
train
Moves a delayed or buried job into the ready queue.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,f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F7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(4465 - 4354) + chr(51) + '\061' + chr(53), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110110) + '\x34', 20830 - 20822), nzTpIcepk0o8('\x30' + chr(8760 - 8649) + chr(0b100001 + 0o21) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(6066 - 5955) + chr(0b110010) + chr(0b100110 + 0o14) + '\062', 0o10), nzTpIcepk0o8(chr(1620 - 1572) + '\157' + '\x33' + chr(53) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + '\061' + chr(0b110111) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(55) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + '\x31', 17769 - 17761), nzTpIcepk0o8(chr(48) + '\157' + chr(1357 - 1302) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + '\x32' + '\067' + chr(48), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(53) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(54 - 5) + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\x30' + '\064', 0b1000), nzTpIcepk0o8(chr(1503 - 1455) + chr(111) + chr(54) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + chr(0b110010) + '\x35' + '\x32', 8), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(0b1 + 0o63) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b110011) + chr(0b101010 + 0o14) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1673 - 1624) + chr(0b100001 + 0o25), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1094 - 1039), 16633 - 16625), nzTpIcepk0o8('\x30' + '\157' + chr(403 - 350), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + chr(0b110011) + chr(0b1110 + 0o50), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(958 - 906) + chr(1050 - 998), ord("\x08")), nzTpIcepk0o8(chr(2229 - 2181) + chr(10861 - 10750) + chr(50) + '\x36' + '\x33', 0o10), nzTpIcepk0o8(chr(1732 - 1684) + chr(7701 - 7590) + '\x31' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(2004 - 1954) + chr(55) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x37' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1801 - 1753) + chr(111) + chr(0b110011) + chr(498 - 444) + '\x34', 13171 - 13163), nzTpIcepk0o8('\x30' + chr(531 - 420) + chr(0b1010 + 0o50) + '\066' + chr(1457 - 1409), 33814 - 33806), nzTpIcepk0o8('\060' + '\157' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(54) + chr(52), 8), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(0b100011 + 0o16) + '\061' + chr(213 - 159), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b100101 + 0o112) + chr(0b110011) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\061' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + '\x31' + chr(54) + chr(0b10 + 0o61), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(7886 - 7775) + chr(0b110011) + '\065' + '\061', 0b1000), nzTpIcepk0o8(chr(1335 - 1287) + chr(111) + chr(339 - 289) + chr(0b10100 + 0o43) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(967 - 919) + chr(0b1000100 + 0o53) + '\062' + '\x30' + '\x35', 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\157' + '\063' + chr(49) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + '\x33' + '\064' + chr(52), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(0b100110 + 0o17) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe3'), chr(9418 - 9318) + chr(0b1100101) + chr(5778 - 5679) + chr(0b1101111) + chr(1718 - 1618) + chr(2289 - 2188))('\165' + chr(12323 - 12207) + chr(0b1100110) + '\x2d' + chr(0b11110 + 0o32)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def o5bSpuU1IAnn(hXMPsSrOQzbh, pDuVZERs4dR8) -> None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x92Gs\xfc\x8b!\x9fl]'), chr(0b11001 + 0o113) + '\x65' + '\x63' + chr(111) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(45) + '\070'))(ES5oEprVxulp(b'\xa6]u\xf9\xc2\x14\x93c\x19\x9dK') % ZvCOeEzA6eww(pDuVZERs4dR8), ES5oEprVxulp(b'\x86}U\xd9\xaa:'))
mayhewj/greenstalk
greenstalk.py
Client.stats_job
def stats_job(self, job: JobOrID) -> Stats: """Returns job statistics. :param job: The job or job ID to return statistics for. """ return self._stats_cmd(b'stats-job %d' % _to_id(job))
python
def stats_job(self, job: JobOrID) -> Stats: """Returns job statistics. :param job: The job or job ID to return statistics for. """ return self._stats_cmd(b'stats-job %d' % _to_id(job))
[ "def", "stats_job", "(", "self", ",", "job", ":", "JobOrID", ")", "->", "Stats", ":", "return", "self", ".", "_stats_cmd", "(", "b'stats-job %d'", "%", "_to_id", "(", "job", ")", ")" ]
Returns job statistics. :param job: The job or job ID to return statistics for.
[ "Returns", "job", "statistics", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L334-L339
train
Returns the job statistics for the given job.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m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dKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(859 - 809) + '\x36' + chr(0b110001), 5203 - 5195), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101 + 0o61) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(9666 - 9555) + chr(49) + '\063' + chr(0b110111), 26182 - 26174), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b11011 + 0o30) + chr(0b101101 + 0o3), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(49) + chr(0b100100 + 0o15), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b100000 + 0o22) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2190 - 2140) + '\x37' + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(55) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b101010 + 0o11) + chr(55), 18577 - 18569), nzTpIcepk0o8(chr(48) + '\157' + chr(1990 - 1939) + '\063' + chr(773 - 722), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11 + 0o154) + chr(430 - 381) + chr(0b110000) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6311 - 6200) + '\x33' + chr(0b110101) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(0b110011) + chr(1412 - 1360) + chr(0b10111 + 0o34), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(233 - 183) + '\x36' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(2199 - 2151) + chr(0b1101111) + chr(0b110011) + chr(0b11100 + 0o33), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(52) + chr(0b110001), 36279 - 36271), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b100 + 0o153) + '\x33' + chr(0b110100) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10000 + 0o137) + '\x34' + chr(50), 3564 - 3556), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1560 - 1509) + chr(1269 - 1220) + '\066', 26920 - 26912), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b10000 + 0o46) + chr(1509 - 1457), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b100011 + 0o17) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + chr(0b101001 + 0o16) + chr(0b110110), 47823 - 47815), nzTpIcepk0o8(chr(117 - 69) + chr(0b1101111) + '\x31' + '\067' + chr(0b101001 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(1637 - 1589) + '\157' + '\x32' + chr(0b10110 + 0o33) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(54) + chr(52), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b100 + 0o55) + chr(0b110001), 198 - 190), nzTpIcepk0o8(chr(924 - 876) + chr(111) + chr(50) + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(1392 - 1342) + chr(0b110100) + chr(0b10010 + 0o43), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + '\x31' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + chr(1100 - 1048), 48267 - 48259), nzTpIcepk0o8('\x30' + chr(227 - 116) + chr(49) + chr(0b110011) + chr(0b1110 + 0o47), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10001 + 0o136) + chr(0b110011) + '\060' + chr(50), 0o10), nzTpIcepk0o8(chr(1757 - 1709) + '\157' + chr(414 - 363) + '\064' + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11100 + 0o26) + chr(2155 - 2107) + chr(963 - 910), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110 + 0o60) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4838 - 4727) + '\x32' + chr(0b110000) + chr(0b10 + 0o61), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\x33' + chr(51), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(53) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x13'), chr(8710 - 8610) + chr(3300 - 3199) + chr(99) + '\157' + chr(3186 - 3086) + chr(101))(chr(0b1001011 + 0o52) + chr(116) + '\146' + chr(0b10110 + 0o27) + chr(0b11 + 0o65)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qQn9Mvu8i8po(hXMPsSrOQzbh, pDuVZERs4dR8) -> iWWqeWLKhaIM: return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'b\xc2C>\xec:\x0b\xdbU\xbb'), chr(100) + chr(1609 - 1508) + chr(0b1010011 + 0o20) + chr(111) + '\144' + chr(2069 - 1968))(chr(5094 - 4977) + chr(9113 - 8997) + '\x66' + '\055' + chr(0b111000)))(ES5oEprVxulp(b'N\xc5V+\xebd>\xd7Z\xff\xfea') % ZvCOeEzA6eww(pDuVZERs4dR8))
mayhewj/greenstalk
greenstalk.py
Client.stats_tube
def stats_tube(self, tube: str) -> Stats: """Returns tube statistics. :param tube: The tube to return statistics for. """ return self._stats_cmd(b'stats-tube %b' % tube.encode('ascii'))
python
def stats_tube(self, tube: str) -> Stats: """Returns tube statistics. :param tube: The tube to return statistics for. """ return self._stats_cmd(b'stats-tube %b' % tube.encode('ascii'))
[ "def", "stats_tube", "(", "self", ",", "tube", ":", "str", ")", "->", "Stats", ":", "return", "self", ".", "_stats_cmd", "(", "b'stats-tube %b'", "%", "tube", ".", "encode", "(", "'ascii'", ")", ")" ]
Returns tube statistics. :param tube: The tube to return statistics for.
[ "Returns", "tube", "statistics", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L341-L346
train
Returns the statistics for the given tube.
GiP5xwVCF98Z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wyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2205 - 2157) + '\157' + chr(49) + '\x36' + '\x33', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\x37' + chr(0b11010 + 0o33), 2748 - 2740), nzTpIcepk0o8('\x30' + chr(6768 - 6657) + chr(0b101111 + 0o3) + '\x31' + chr(2520 - 2466), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011000 + 0o27) + chr(0b110 + 0o55) + '\x34' + chr(0b110011), 40250 - 40242), nzTpIcepk0o8(chr(1459 - 1411) + chr(0b1101111) + '\x32' + '\x35' + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(8219 - 8108) + chr(50) + chr(0b1000 + 0o56) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1210 - 1161) + chr(48) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b10000 + 0o41) + chr(0b110010) + chr(50), 65511 - 65503), nzTpIcepk0o8('\060' + chr(6340 - 6229) + '\x33' + '\x36' + chr(53), 50541 - 50533), nzTpIcepk0o8(chr(749 - 701) + chr(111) + chr(0b10000 + 0o41) + chr(720 - 667) + chr(0b1000 + 0o52), 7055 - 7047), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(6548 - 6437) + '\x32' + '\x30' + chr(826 - 773), 0o10), nzTpIcepk0o8(chr(1652 - 1604) + '\x6f' + '\x31' + chr(0b110011) + chr(801 - 750), ord("\x08")), nzTpIcepk0o8(chr(789 - 741) + chr(0b1101111) + '\063' + '\x34' + chr(0b11010 + 0o32), 22084 - 22076), nzTpIcepk0o8(chr(0b110000) + chr(9857 - 9746) + chr(0b110011) + '\x37' + chr(1454 - 1402), 0o10), nzTpIcepk0o8(chr(1286 - 1238) + '\157' + chr(0b110010) + chr(0b110101) + '\061', 62471 - 62463), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b11110 + 0o22) + chr(0b100011 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(55) + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b110100) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(518 - 470) + '\x6f' + chr(50) + chr(0b110110) + chr(0b10011 + 0o36), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10 + 0o155) + chr(0b101010 + 0o7) + chr(0b110000) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\x32' + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b101 + 0o61) + chr(0b100101 + 0o20), 0b1000), nzTpIcepk0o8(chr(48) + chr(8573 - 8462) + chr(0b110 + 0o53) + chr(0b110111) + chr(0b100111 + 0o16), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b1101 + 0o50) + chr(174 - 122), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b1011 + 0o53) + chr(0b110110), 19955 - 19947), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(2444 - 2393) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(756 - 708) + chr(0b1010001 + 0o36) + '\x32' + chr(376 - 321) + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(1102 - 1051) + chr(52) + chr(0b1111 + 0o43), 27003 - 26995), nzTpIcepk0o8('\x30' + chr(10096 - 9985) + chr(51) + '\x32' + chr(1383 - 1333), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100101 + 0o15) + chr(52) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(0b101010 + 0o105) + '\062' + '\x30' + chr(0b1 + 0o66), 30090 - 30082), nzTpIcepk0o8(chr(48) + chr(5020 - 4909) + chr(0b110001) + chr(0b10110 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(1242 - 1194) + '\x6f' + '\x32' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + '\061' + chr(0b110000), 18889 - 18881), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\067' + chr(2092 - 2038), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100011 + 0o14) + '\x32' + chr(54) + chr(0b110101 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(514 - 466) + '\157' + chr(49) + chr(54) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\x33' + chr(48) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(49), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110101) + chr(0b10010 + 0o36), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b']'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1010110 + 0o36) + chr(1285 - 1183) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def m791GUME5h8x(hXMPsSrOQzbh, c3RFlT7QzD8_) -> iWWqeWLKhaIM: return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b',\xce\xfa\x82\xda\xc5\x1c1\x98\x0e'), '\144' + '\145' + chr(9426 - 9327) + chr(0b11100 + 0o123) + '\x64' + chr(1838 - 1737))(chr(117) + '\164' + '\x66' + '\x2d' + chr(606 - 550)))(ES5oEprVxulp(b"\x00\xc9\xef\x97\xdd\x9b7'\x97\x0f<\xa09") % roI3spqORKae(c3RFlT7QzD8_, roI3spqORKae(ES5oEprVxulp(b'*\xcc\xc7\x82\xfc\xf0%7\x9a^T\xe4'), chr(7395 - 7295) + '\x65' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x12\xce\xed\x8a\xc7'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\157' + '\144' + chr(101))(chr(0b1101100 + 0o11) + '\x74' + '\x66' + '\x2d' + chr(3135 - 3079))))
mayhewj/greenstalk
greenstalk.py
Client.pause_tube
def pause_tube(self, tube: str, delay: int) -> None: """Prevents jobs from being reserved from a tube for a period of time. :param tube: The tube to pause. :param delay: The number of seconds to pause the tube for. """ self._send_cmd(b'pause-tube %b %d' % (tube.encode('ascii'), delay), b'PAUSED')
python
def pause_tube(self, tube: str, delay: int) -> None: """Prevents jobs from being reserved from a tube for a period of time. :param tube: The tube to pause. :param delay: The number of seconds to pause the tube for. """ self._send_cmd(b'pause-tube %b %d' % (tube.encode('ascii'), delay), b'PAUSED')
[ "def", "pause_tube", "(", "self", ",", "tube", ":", "str", ",", "delay", ":", "int", ")", "->", "None", ":", "self", ".", "_send_cmd", "(", "b'pause-tube %b %d'", "%", "(", "tube", ".", "encode", "(", "'ascii'", ")", ",", "delay", ")", ",", "b'PAUSED'", ")" ]
Prevents jobs from being reserved from a tube for a period of time. :param tube: The tube to pause. :param delay: The number of seconds to pause the tube for.
[ "Prevents", "jobs", "from", "being", "reserved", "from", "a", "tube", "for", "a", "period", "of", "time", "." ]
765a5e7321a101a08e400a66e88df06c57406f58
https://github.com/mayhewj/greenstalk/blob/765a5e7321a101a08e400a66e88df06c57406f58/greenstalk.py#L352-L358
train
Prevents jobs from being reserved from a tube for a period of time.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,zn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ZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + chr(330 - 279) + chr(499 - 447) + chr(1352 - 1302), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33', 46364 - 46356), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + '\063' + chr(246 - 196) + chr(1796 - 1745), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010 + 0o1) + '\x33' + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(3133 - 3022) + chr(0b101000 + 0o12) + '\065' + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(1423 - 1312) + chr(0b0 + 0o61) + chr(1476 - 1421) + chr(0b100100 + 0o16), 14390 - 14382), nzTpIcepk0o8('\060' + chr(0b1001000 + 0o47) + chr(2089 - 2039) + chr(1217 - 1164) + '\064', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + '\063', 8), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + chr(0b110111) + '\060', 57216 - 57208), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b100000 + 0o20) + '\065', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(2916 - 2861) + chr(587 - 536), 2739 - 2731), nzTpIcepk0o8('\x30' + '\157' + chr(1717 - 1666) + chr(0b100110 + 0o15) + chr(1415 - 1360), 23265 - 23257), nzTpIcepk0o8(chr(595 - 547) + chr(0b1101111) + '\x33' + chr(52) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b110101) + chr(650 - 596), 13233 - 13225), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b111010 + 0o65) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b11001 + 0o31) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b10010 + 0o40) + chr(0b100101 + 0o21) + '\x31', 0o10), nzTpIcepk0o8(chr(831 - 783) + '\157' + '\061' + chr(0b110001) + chr(0b101 + 0o57), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\066' + chr(0b10100 + 0o43), 32102 - 32094), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(9289 - 9178) + '\x31' + chr(0b100 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2057 - 2008) + chr(1474 - 1424) + chr(0b11 + 0o56), 0b1000), nzTpIcepk0o8(chr(1546 - 1498) + '\157' + '\061' + chr(54) + '\063', 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(4725 - 4614) + chr(1300 - 1249) + '\067' + chr(472 - 424), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7836 - 7725) + '\063' + '\063' + '\067', 8), nzTpIcepk0o8('\x30' + chr(8695 - 8584) + chr(0b10101 + 0o35) + '\061' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(10336 - 10225) + '\061' + chr(0b110110) + chr(0b10111 + 0o34), 8), nzTpIcepk0o8(chr(201 - 153) + chr(5502 - 5391) + chr(0b110011) + '\x35' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b101010 + 0o105) + '\x31' + chr(0b110101) + chr(0b110011), 11796 - 11788), nzTpIcepk0o8('\060' + chr(0b100 + 0o153) + '\062' + chr(50) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\067' + chr(776 - 723), 21101 - 21093), nzTpIcepk0o8(chr(48) + chr(0b101100 + 0o103) + chr(50) + '\061' + chr(304 - 249), 0b1000), nzTpIcepk0o8(chr(1915 - 1867) + '\157' + chr(1004 - 954) + chr(0b110011 + 0o0) + chr(50), 9807 - 9799), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(1576 - 1522) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(0b101101 + 0o5) + chr(0b100100 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\x30' + '\064', 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(10277 - 10166) + chr(0b110111) + chr(0b1111 + 0o47), 20366 - 20358), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(49) + chr(0b100 + 0o57), 0b1000), nzTpIcepk0o8('\x30' + chr(0b10 + 0o155) + chr(51) + '\x30' + chr(0b1110 + 0o43), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(246 - 195) + '\067', 8), nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + chr(51) + '\060' + chr(0b10000 + 0o45), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b10101 + 0o132) + '\065' + chr(1674 - 1626), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcc'), chr(100) + chr(101) + '\x63' + chr(111) + chr(1049 - 949) + '\x65')('\x75' + chr(0b1110100) + chr(1406 - 1304) + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def b6uLmslgEBk_(hXMPsSrOQzbh, c3RFlT7QzD8_, At656iyyS8xP) -> None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbdp\xb6\xb7\xcc%\xcfn\\'), chr(0b10 + 0o142) + '\x65' + chr(0b1100011) + chr(0b111000 + 0o67) + '\144' + chr(2091 - 1990))('\165' + chr(116) + '\x66' + chr(0b11111 + 0o16) + '\070'))(ES5oEprVxulp(b'\x92b\xa6\xaa\xcdW\xd8vZ\xa0\xdb\xfa\x87\x8e%q') % (roI3spqORKae(c3RFlT7QzD8_, roI3spqORKae(ES5oEprVxulp(b'\xbbr\x9a\xb8\xfa<\xcafW\xf1\xb3\xbe'), chr(0b111101 + 0o47) + chr(0b1100101) + '\x63' + chr(0b1100 + 0o143) + '\x64' + chr(0b1100 + 0o131))('\x75' + chr(0b1110100) + chr(0b100101 + 0o101) + chr(0b101101) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x83p\xb0\xb0\xc1'), '\144' + chr(0b1100101) + chr(0b11101 + 0o106) + chr(0b101010 + 0o105) + '\x64' + '\x65')(chr(0b1010101 + 0o40) + chr(116) + '\146' + chr(45) + chr(56))), At656iyyS8xP), ES5oEprVxulp(b'\xb2B\x86\x8a\xed>'))
fedora-infra/fedora-messaging
fedora_messaging/cli.py
cli
def cli(conf): """The fedora-messaging command line interface.""" if conf: if not os.path.isfile(conf): raise click.exceptions.BadParameter("{} is not a file".format(conf)) try: config.conf.load_config(config_path=conf) except exceptions.ConfigurationException as e: raise click.exceptions.BadParameter(str(e)) twisted_observer = legacy_twisted_log.PythonLoggingObserver() twisted_observer.start() config.conf.setup_logging()
python
def cli(conf): """The fedora-messaging command line interface.""" if conf: if not os.path.isfile(conf): raise click.exceptions.BadParameter("{} is not a file".format(conf)) try: config.conf.load_config(config_path=conf) except exceptions.ConfigurationException as e: raise click.exceptions.BadParameter(str(e)) twisted_observer = legacy_twisted_log.PythonLoggingObserver() twisted_observer.start() config.conf.setup_logging()
[ "def", "cli", "(", "conf", ")", ":", "if", "conf", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "conf", ")", ":", "raise", "click", ".", "exceptions", ".", "BadParameter", "(", "\"{} is not a file\"", ".", "format", "(", "conf", ")", ")", "try", ":", "config", ".", "conf", ".", "load_config", "(", "config_path", "=", "conf", ")", "except", "exceptions", ".", "ConfigurationException", "as", "e", ":", "raise", "click", ".", "exceptions", ".", "BadParameter", "(", "str", "(", "e", ")", ")", "twisted_observer", "=", "legacy_twisted_log", ".", "PythonLoggingObserver", "(", ")", "twisted_observer", ".", "start", "(", ")", "config", ".", "conf", ".", "setup_logging", "(", ")" ]
The fedora-messaging command line interface.
[ "The", "fedora", "-", "messaging", "command", "line", "interface", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/cli.py#L78-L89
train
The fedora - messaging command line interface.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn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qoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + chr(1981 - 1932) + '\062' + chr(0b10101 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(2256 - 2145) + '\062' + '\067' + chr(0b100100 + 0o20), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(527 - 475) + chr(171 - 119), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(51) + '\065', 0o10), nzTpIcepk0o8(chr(1732 - 1684) + chr(1509 - 1398) + chr(0b110011 + 0o0) + chr(0b1001 + 0o51) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(2063 - 1952) + chr(2460 - 2410) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1429 - 1381) + chr(1840 - 1729) + '\x31' + chr(49) + chr(0b110000), 35589 - 35581), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(373 - 322) + chr(0b101010 + 0o12) + chr(0b110 + 0o56), 48530 - 48522), nzTpIcepk0o8('\060' + chr(111) + chr(0b1111 + 0o44) + chr(0b1 + 0o61) + chr(0b110001 + 0o4), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b0 + 0o65) + '\x34', 0b1000), nzTpIcepk0o8(chr(1596 - 1548) + chr(0b1000 + 0o147) + '\063' + chr(2635 - 2582) + chr(2583 - 2530), 0o10), nzTpIcepk0o8(chr(58 - 10) + chr(0b111000 + 0o67) + chr(899 - 849) + chr(206 - 152) + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(5643 - 5532) + chr(0b110011) + chr(48) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(6238 - 6127) + chr(0b10001 + 0o42) + chr(0b110010) + chr(54), 4433 - 4425), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(573 - 523) + '\x34', 0b1000), nzTpIcepk0o8(chr(1276 - 1228) + chr(7563 - 7452) + '\x32' + chr(0b110110) + '\x37', 0b1000), nzTpIcepk0o8(chr(75 - 27) + '\x6f' + '\x31' + chr(0b100110 + 0o15) + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100001 + 0o16) + '\061' + chr(1848 - 1795) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010 + 0o145) + chr(0b11101 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110100) + '\064', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1828 - 1777) + chr(0b110111) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(50) + chr(0b110110) + chr(0b0 + 0o67), 8), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1101111) + '\063' + '\061' + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(9787 - 9676) + chr(0b110010) + '\060' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(10172 - 10061) + chr(54) + chr(0b110001), 45794 - 45786), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(1777 - 1728) + chr(1820 - 1770) + '\061', 52727 - 52719), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110101) + chr(0b110000), 8), nzTpIcepk0o8(chr(616 - 568) + chr(9282 - 9171) + '\x33' + chr(847 - 799), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\060' + chr(2167 - 2118), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\063' + chr(0b101110 + 0o4), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\062' + '\062' + '\066', 27390 - 27382), nzTpIcepk0o8('\x30' + chr(0b100111 + 0o110) + chr(0b100010 + 0o21) + '\x33' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010 + 0o145) + chr(0b110101) + chr(1226 - 1171), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11010 + 0o31) + chr(0b110100) + '\065', 39928 - 39920), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(0b110 + 0o57) + chr(452 - 400), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(313 - 263) + '\x34', 42474 - 42466), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b10100 + 0o42) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\066' + chr(0b1 + 0o65), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1660 - 1612) + chr(0b1101111) + chr(1893 - 1840) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'}'), '\x64' + chr(101) + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(117) + '\x74' + chr(6164 - 6062) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def YSLK6gvdfs4x(aESS6GwxoZhA): if aESS6GwxoZhA: if not roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b':\xcfB4\xb8t'), '\144' + chr(3453 - 3352) + '\143' + chr(0b1011110 + 0o21) + chr(0b110 + 0o136) + chr(101))(chr(117) + '\x74' + '\146' + chr(45) + chr(0b100111 + 0o21)))(aESS6GwxoZhA): raise roI3spqORKae(uNNTJtNION1L.exceptions, roI3spqORKae(ES5oEprVxulp(b'\x11\xdd@\r\xb5cI%\x81\xa1\x89\x9f'), chr(4479 - 4379) + chr(3329 - 3228) + chr(0b1100011) + chr(10541 - 10430) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + '\146' + chr(0b0 + 0o55) + chr(0b111000)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b"(\xc1\x044\xa71F'\x90\xf5\x8d\xcd\xd2\xae\xba1"), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(8345 - 8245) + chr(0b1101 + 0o130))(chr(0b100111 + 0o116) + '\164' + chr(334 - 232) + '\x2d' + chr(0b100111 + 0o21)), roI3spqORKae(ES5oEprVxulp(b'"\x8f\x17\x16\x93"N\'\xb5\x8a\xaf\xa7'), '\x64' + chr(8998 - 8897) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(4707 - 4606))('\x75' + '\x74' + '\146' + '\x2d' + chr(2680 - 2624)))(aESS6GwxoZhA)) try: roI3spqORKae(kgkKUcD36lls.conf, roI3spqORKae(ES5oEprVxulp(b' \x8fG\x1a\xe3F|~\x83\xe6\xab\x8f'), chr(100) + chr(0b101110 + 0o67) + chr(0b10110 + 0o115) + '\x6f' + chr(100) + chr(9868 - 9767))(chr(0b11101 + 0o130) + chr(6053 - 5937) + '\x66' + chr(45) + chr(0b0 + 0o70)))(config_path=aESS6GwxoZhA) except roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\x10\xd3J;\xbdv]:\x85\xa1\x85\x82\xda\x82\xae7\xd2*\x1criJ'), chr(4686 - 4586) + '\145' + '\143' + '\x6f' + chr(0b11010 + 0o112) + chr(0b1100101))('\x75' + chr(0b1001110 + 0o46) + chr(0b1100110) + '\055' + chr(0b101 + 0o63))) as wgf0sgcu_xPL: raise roI3spqORKae(uNNTJtNION1L.exceptions, roI3spqORKae(ES5oEprVxulp(b'\x11\xdd@\r\xb5cI%\x81\xa1\x89\x9f'), '\x64' + chr(0b1010011 + 0o22) + chr(99) + '\x6f' + chr(6162 - 6062) + chr(8959 - 8858))(chr(4974 - 4857) + chr(0b111100 + 0o70) + chr(9867 - 9765) + chr(45) + '\x38'))(N9zlRy29S1SS(wgf0sgcu_xPL)) aYqnmJX355wj = AoFXRBSsY4Sr.PythonLoggingObserver() roI3spqORKae(aYqnmJX355wj, roI3spqORKae(ES5oEprVxulp(b'\x18\xedF\x15\x92EK$\xbb\x99\xa7\x94'), chr(0b1011001 + 0o13) + '\145' + chr(0b111111 + 0o44) + '\x6f' + chr(281 - 181) + '\145')(chr(0b1110101) + chr(11533 - 11417) + chr(102) + '\x2d' + chr(0b100101 + 0o23)))() roI3spqORKae(kgkKUcD36lls.conf, roI3spqORKae(ES5oEprVxulp(b" \xd9P(\xa4ND'\x83\xb2\x85\x83\xd3"), '\x64' + chr(101) + '\x63' + chr(0b1101111) + chr(100) + '\145')(chr(117) + chr(0b1101001 + 0o13) + '\146' + '\055' + '\070'))()
fedora-infra/fedora-messaging
fedora_messaging/cli.py
consume
def consume(exchange, queue_name, routing_key, callback, app_name): """Consume messages from an AMQP queue using a Python callback.""" # The configuration validates these are not null and contain all required keys # when it is loaded. bindings = config.conf["bindings"] queues = config.conf["queues"] # The CLI and config.DEFAULTS have different defaults for the queue # settings at the moment. We should select a universal default in the # future and remove this. Unfortunately that will break backwards compatibility. if queues == config.DEFAULTS["queues"]: queues[config._default_queue_name]["durable"] = True queues[config._default_queue_name]["auto_delete"] = False if queue_name: queues = {queue_name: config.conf["queues"][config._default_queue_name]} for binding in bindings: binding["queue"] = queue_name if exchange: for binding in bindings: binding["exchange"] = exchange if routing_key: for binding in bindings: binding["routing_keys"] = routing_key callback_path = callback or config.conf["callback"] if not callback_path: raise click.ClickException( "A Python path to a callable object that accepts the message must be provided" ' with the "--callback" command line option or in the configuration file' ) try: module, cls = callback_path.strip().split(":") except ValueError: raise click.ClickException( "Unable to parse the callback path ({}); the " 'expected format is "my_package.module:' 'callable_object"'.format(callback_path) ) try: module = importlib.import_module(module) except ImportError as e: provider = "--callback argument" if callback else "configuration file" raise click.ClickException( "Failed to import the callback module ({}) provided in the {}".format( str(e), provider ) ) try: callback = getattr(module, cls) except AttributeError as e: raise click.ClickException( "Unable to import {} ({}); is the package installed? The python path should " 'be in the format "my_package.module:callable_object"'.format( callback_path, str(e) ) ) if app_name: config.conf["client_properties"]["app"] = app_name _log.info("Starting consumer with %s callback", callback_path) try: deferred_consumers = api.twisted_consume( callback, bindings=bindings, queues=queues ) deferred_consumers.addCallback(_consume_callback) deferred_consumers.addErrback(_consume_errback) except ValueError as e: click_version = pkg_resources.get_distribution("click").parsed_version if click_version < pkg_resources.parse_version("7.0"): raise click.exceptions.BadOptionUsage(str(e)) else: raise click.exceptions.BadOptionUsage("callback", str(e)) reactor.run() sys.exit(_exit_code)
python
def consume(exchange, queue_name, routing_key, callback, app_name): """Consume messages from an AMQP queue using a Python callback.""" # The configuration validates these are not null and contain all required keys # when it is loaded. bindings = config.conf["bindings"] queues = config.conf["queues"] # The CLI and config.DEFAULTS have different defaults for the queue # settings at the moment. We should select a universal default in the # future and remove this. Unfortunately that will break backwards compatibility. if queues == config.DEFAULTS["queues"]: queues[config._default_queue_name]["durable"] = True queues[config._default_queue_name]["auto_delete"] = False if queue_name: queues = {queue_name: config.conf["queues"][config._default_queue_name]} for binding in bindings: binding["queue"] = queue_name if exchange: for binding in bindings: binding["exchange"] = exchange if routing_key: for binding in bindings: binding["routing_keys"] = routing_key callback_path = callback or config.conf["callback"] if not callback_path: raise click.ClickException( "A Python path to a callable object that accepts the message must be provided" ' with the "--callback" command line option or in the configuration file' ) try: module, cls = callback_path.strip().split(":") except ValueError: raise click.ClickException( "Unable to parse the callback path ({}); the " 'expected format is "my_package.module:' 'callable_object"'.format(callback_path) ) try: module = importlib.import_module(module) except ImportError as e: provider = "--callback argument" if callback else "configuration file" raise click.ClickException( "Failed to import the callback module ({}) provided in the {}".format( str(e), provider ) ) try: callback = getattr(module, cls) except AttributeError as e: raise click.ClickException( "Unable to import {} ({}); is the package installed? The python path should " 'be in the format "my_package.module:callable_object"'.format( callback_path, str(e) ) ) if app_name: config.conf["client_properties"]["app"] = app_name _log.info("Starting consumer with %s callback", callback_path) try: deferred_consumers = api.twisted_consume( callback, bindings=bindings, queues=queues ) deferred_consumers.addCallback(_consume_callback) deferred_consumers.addErrback(_consume_errback) except ValueError as e: click_version = pkg_resources.get_distribution("click").parsed_version if click_version < pkg_resources.parse_version("7.0"): raise click.exceptions.BadOptionUsage(str(e)) else: raise click.exceptions.BadOptionUsage("callback", str(e)) reactor.run() sys.exit(_exit_code)
[ "def", "consume", "(", "exchange", ",", "queue_name", ",", "routing_key", ",", "callback", ",", "app_name", ")", ":", "# The configuration validates these are not null and contain all required keys", "# when it is loaded.", "bindings", "=", "config", ".", "conf", "[", "\"bindings\"", "]", "queues", "=", "config", ".", "conf", "[", "\"queues\"", "]", "# The CLI and config.DEFAULTS have different defaults for the queue", "# settings at the moment. We should select a universal default in the", "# future and remove this. Unfortunately that will break backwards compatibility.", "if", "queues", "==", "config", ".", "DEFAULTS", "[", "\"queues\"", "]", ":", "queues", "[", "config", ".", "_default_queue_name", "]", "[", "\"durable\"", "]", "=", "True", "queues", "[", "config", ".", "_default_queue_name", "]", "[", "\"auto_delete\"", "]", "=", "False", "if", "queue_name", ":", "queues", "=", "{", "queue_name", ":", "config", ".", "conf", "[", "\"queues\"", "]", "[", "config", ".", "_default_queue_name", "]", "}", "for", "binding", "in", "bindings", ":", "binding", "[", "\"queue\"", "]", "=", "queue_name", "if", "exchange", ":", "for", "binding", "in", "bindings", ":", "binding", "[", "\"exchange\"", "]", "=", "exchange", "if", "routing_key", ":", "for", "binding", "in", "bindings", ":", "binding", "[", "\"routing_keys\"", "]", "=", "routing_key", "callback_path", "=", "callback", "or", "config", ".", "conf", "[", "\"callback\"", "]", "if", "not", "callback_path", ":", "raise", "click", ".", "ClickException", "(", "\"A Python path to a callable object that accepts the message must be provided\"", "' with the \"--callback\" command line option or in the configuration file'", ")", "try", ":", "module", ",", "cls", "=", "callback_path", ".", "strip", "(", ")", ".", "split", "(", "\":\"", ")", "except", "ValueError", ":", "raise", "click", ".", "ClickException", "(", "\"Unable to parse the callback path ({}); the \"", "'expected format is \"my_package.module:'", "'callable_object\"'", ".", "format", "(", "callback_path", ")", ")", "try", ":", "module", "=", "importlib", ".", "import_module", "(", "module", ")", "except", "ImportError", "as", "e", ":", "provider", "=", "\"--callback argument\"", "if", "callback", "else", "\"configuration file\"", "raise", "click", ".", "ClickException", "(", "\"Failed to import the callback module ({}) provided in the {}\"", ".", "format", "(", "str", "(", "e", ")", ",", "provider", ")", ")", "try", ":", "callback", "=", "getattr", "(", "module", ",", "cls", ")", "except", "AttributeError", "as", "e", ":", "raise", "click", ".", "ClickException", "(", "\"Unable to import {} ({}); is the package installed? The python path should \"", "'be in the format \"my_package.module:callable_object\"'", ".", "format", "(", "callback_path", ",", "str", "(", "e", ")", ")", ")", "if", "app_name", ":", "config", ".", "conf", "[", "\"client_properties\"", "]", "[", "\"app\"", "]", "=", "app_name", "_log", ".", "info", "(", "\"Starting consumer with %s callback\"", ",", "callback_path", ")", "try", ":", "deferred_consumers", "=", "api", ".", "twisted_consume", "(", "callback", ",", "bindings", "=", "bindings", ",", "queues", "=", "queues", ")", "deferred_consumers", ".", "addCallback", "(", "_consume_callback", ")", "deferred_consumers", ".", "addErrback", "(", "_consume_errback", ")", "except", "ValueError", "as", "e", ":", "click_version", "=", "pkg_resources", ".", "get_distribution", "(", "\"click\"", ")", ".", "parsed_version", "if", "click_version", "<", "pkg_resources", ".", "parse_version", "(", "\"7.0\"", ")", ":", "raise", "click", ".", "exceptions", ".", "BadOptionUsage", "(", "str", "(", "e", ")", ")", "else", ":", "raise", "click", ".", "exceptions", ".", "BadOptionUsage", "(", "\"callback\"", ",", "str", "(", "e", ")", ")", "reactor", ".", "run", "(", ")", "sys", ".", "exit", "(", "_exit_code", ")" ]
Consume messages from an AMQP queue using a Python callback.
[ "Consume", "messages", "from", "an", "AMQP", "queue", "using", "a", "Python", "callback", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/cli.py#L98-L178
train
Consume messages from an AMQP queue using a Python callback.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1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_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1670 - 1622) + '\x6f' + '\065' + chr(1710 - 1657), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(2551 - 2500) + '\061' + '\x37', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + chr(0b110011) + '\063' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(324 - 273) + chr(50) + chr(746 - 691), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b111101 + 0o62) + '\062' + chr(362 - 312) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(410 - 359) + chr(0b110101) + '\066', 55102 - 55094), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(1127 - 1076) + chr(1283 - 1235) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9168 - 9057) + '\062' + '\x37' + chr(1383 - 1329), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b10011 + 0o40), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(175 - 125) + '\067' + chr(759 - 709), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b110010) + chr(50) + chr(0b100000 + 0o22), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(9926 - 9815) + chr(0b10001 + 0o40) + chr(0b0 + 0o65), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b0 + 0o64) + chr(0b101101 + 0o12), 52529 - 52521), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(678 - 629) + chr(53) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x30' + chr(50), 46574 - 46566), nzTpIcepk0o8(chr(1324 - 1276) + chr(0b1101111) + chr(0b101100 + 0o5) + '\x30' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + '\x31' + '\062' + chr(0b0 + 0o62), 11876 - 11868), nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(6016 - 5905) + chr(1806 - 1757) + chr(49) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(2175 - 2127) + '\157' + chr(0b110011) + chr(53) + '\x35', 49023 - 49015), nzTpIcepk0o8(chr(48) + '\157' + chr(2031 - 1980) + '\066' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b101011 + 0o104) + '\063' + chr(1746 - 1693) + chr(1852 - 1797), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b110100 + 0o73) + '\x34' + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\063' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(844 - 793) + '\x37' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b110010) + chr(48), 40175 - 40167), nzTpIcepk0o8(chr(1452 - 1404) + '\x6f' + '\x33' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(803 - 754) + chr(0b110001) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4383 - 4272) + chr(49) + chr(2189 - 2141) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(82 - 34) + chr(9172 - 9061) + '\x31' + chr(0b110001) + chr(51), 65190 - 65182), nzTpIcepk0o8('\x30' + chr(6228 - 6117) + chr(1828 - 1779) + '\064' + chr(2268 - 2216), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(1038 - 984), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110010) + chr(1189 - 1136) + chr(54), 0b1000), nzTpIcepk0o8(chr(2284 - 2236) + chr(0b1101111) + '\061' + chr(0b110100) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1427 - 1379) + '\157' + '\063' + '\x37' + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(50) + chr(0b110010 + 0o5) + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + chr(0b110010) + chr(2554 - 2500) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110110) + chr(55), 17540 - 17532), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\x34' + chr(0b110111), 59759 - 59751)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + chr(1728 - 1680), 52515 - 52507)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x03'), chr(0b1100100) + chr(4600 - 4499) + chr(0b111 + 0o134) + '\x6f' + chr(792 - 692) + chr(101))(chr(0b10011 + 0o142) + '\x74' + chr(0b1100011 + 0o3) + chr(0b10111 + 0o26) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def X3OqjwXXClZ4(bxTA8Iugm8rP, Di0BHhxKvOdF, O7peZs8jMKVH, jG5KU4UUGnk5, VLbtkEx9kiB5): Eov4xKwUG62w = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'O\xa6\xb4\xb3\xf9\x80\xa7\xcd'), '\144' + chr(8271 - 8170) + '\x63' + chr(0b1000 + 0o147) + chr(0b1100100) + chr(5273 - 5172))(chr(0b1011100 + 0o31) + chr(0b1110100) + '\146' + '\x2d' + '\070')] NJajU877lUB0 = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\\\xba\xbf\xa2\xf5\x9d'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(992 - 891))(chr(117) + chr(0b10101 + 0o137) + chr(102) + chr(45) + chr(0b100010 + 0o26))] if NJajU877lUB0 == roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'@\x96\x9e\xa3\xd1\xab\xf9\xd7Q\xf0\xa7k'), chr(100) + chr(0b111101 + 0o50) + chr(0b101011 + 0o70) + chr(0b1111 + 0o140) + chr(100) + chr(0b11010 + 0o113))('\165' + chr(116) + chr(0b1100110) + chr(1384 - 1339) + chr(0b111000)))[roI3spqORKae(ES5oEprVxulp(b'\\\xba\xbf\xa2\xf5\x9d'), '\144' + '\x65' + chr(0b111111 + 0o44) + chr(0b1101111) + chr(100) + chr(0b1000101 + 0o40))(chr(117) + '\164' + '\x66' + '\055' + '\x38')]: NJajU877lUB0[kgkKUcD36lls.WVSaK6VTgfN0][roI3spqORKae(ES5oEprVxulp(b'I\xba\xa8\xb6\xf2\x82\xa5'), '\x64' + chr(4649 - 4548) + chr(3312 - 3213) + chr(7761 - 7650) + chr(0b1100100) + '\x65')(chr(9516 - 9399) + chr(0b111001 + 0o73) + chr(1160 - 1058) + '\x2d' + '\x38')] = nzTpIcepk0o8('\060' + chr(111) + chr(2251 - 2202), 8) NJajU877lUB0[kgkKUcD36lls.WVSaK6VTgfN0][roI3spqORKae(ES5oEprVxulp(b'L\xba\xae\xb8\xcf\x8a\xa5\xd2f\xce\xf7'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(8578 - 8478) + '\145')(chr(0b1110101) + '\x74' + chr(102) + '\055' + '\070')] = nzTpIcepk0o8(chr(0b1 + 0o57) + chr(9034 - 8923) + chr(2281 - 2233), ord("\x08")) if Di0BHhxKvOdF: NJajU877lUB0 = {Di0BHhxKvOdF: kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\\\xba\xbf\xa2\xf5\x9d'), chr(6253 - 6153) + '\145' + chr(2344 - 2245) + chr(2238 - 2127) + '\x64' + chr(0b10101 + 0o120))(chr(117) + '\x74' + chr(102) + chr(766 - 721) + chr(714 - 658))][kgkKUcD36lls.WVSaK6VTgfN0]} for kUiv6IrAIyl1 in Eov4xKwUG62w: kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'\\\xba\xbf\xa2\xf5'), chr(3909 - 3809) + chr(101) + '\x63' + chr(111) + '\x64' + chr(0b1100101))(chr(117) + chr(0b111010 + 0o72) + '\x66' + '\x2d' + chr(56))] = Di0BHhxKvOdF if bxTA8Iugm8rP: for kUiv6IrAIyl1 in Eov4xKwUG62w: kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'H\xb7\xb9\xbf\xf1\x80\xa7\xdb'), chr(0b1100100) + chr(0b1100000 + 0o5) + chr(99) + '\157' + '\144' + chr(0b1100101))(chr(117) + '\x74' + chr(0b1100110) + chr(1082 - 1037) + chr(0b11101 + 0o33))] = bxTA8Iugm8rP if O7peZs8jMKVH: for kUiv6IrAIyl1 in Eov4xKwUG62w: kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'_\xa0\xaf\xa3\xf9\x80\xa7\xe1h\xdf\xeb~'), chr(100) + '\x65' + chr(99) + chr(0b101110 + 0o101) + chr(100) + chr(0b1010111 + 0o16))('\165' + chr(0b100001 + 0o123) + chr(0b1100110) + chr(45) + chr(56))] = O7peZs8jMKVH jK17FCS_1Kbm = jG5KU4UUGnk5 or kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'N\xae\xb6\xbb\xf2\x8f\xa3\xd5'), chr(0b1100100) + '\145' + chr(99) + chr(0b1101111) + chr(100) + '\x65')(chr(117) + chr(116) + chr(102) + chr(45) + chr(0b101100 + 0o14))] if not jK17FCS_1Kbm: raise roI3spqORKae(uNNTJtNION1L, roI3spqORKae(ES5oEprVxulp(b'n\xa3\xb3\xb4\xfb\xab\xb8\xddf\xca\xe6dH\x05'), '\x64' + chr(101) + '\143' + chr(0b1100111 + 0o10) + '\x64' + chr(101))(chr(117) + chr(682 - 566) + chr(102) + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'l\xef\x8a\xae\xe4\x86\xaf\xd0#\xca\xf3yOK\xb6.r`m\x8e\x96\x83J?\x9d\xbcyh-)\x0e{\xcd\x17\xd9\xc9\xd8mCGL\xac\xb9\xb2\xe0\x9a\xb3\x9ew\xd2\xf7-J\x0e\xb123f(\xcd\x9a\x9aU*\xdf\xb2yh29\x0bh\xc7\x07\x9c\xd9\x90{^\x13E\xef\xae\xbf\xf5\xce\xe2\x93.\xd9\xf3aK\t\xa3"9#m\x8e\x98\x82K?\x91\xb4<$+%\x01>\xc1\x13\x8d\xd4\xdfb\x17\x08_\xef\xb3\xb9\xb0\x9a\xa8\xdb#\xd9\xfdcA\x02\xa54 `9\x84\x98\x81\x068\x96\xbcy'), chr(2020 - 1920) + '\x65' + '\x63' + chr(0b100001 + 0o116) + '\144' + '\x65')('\x75' + chr(0b1001011 + 0o51) + '\146' + chr(45) + '\x38')) try: (pOp6HxxfV61L, _1vzISbJ_R2i) = jK17FCS_1Kbm.strip().LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\x17'), '\x64' + chr(0b1000110 + 0o37) + '\x63' + '\x6f' + chr(8937 - 8837) + chr(0b1100000 + 0o5))(chr(117) + '\x74' + chr(0b100 + 0o142) + chr(1813 - 1768) + chr(0b111000))) except WbNHlDKpyPtQ: raise roI3spqORKae(uNNTJtNION1L, roI3spqORKae(ES5oEprVxulp(b'n\xa3\xb3\xb4\xfb\xab\xb8\xddf\xca\xe6dH\x05'), chr(0b1100100) + chr(0b1100101) + chr(1866 - 1767) + chr(111) + chr(100) + '\x65')(chr(117) + chr(0b101101 + 0o107) + '\146' + '\055' + '\070'))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'x\xa1\xbb\xb5\xfc\x8b\xe0\xcal\x9a\xe2lU\x18\xa7a&i(\xcd\x94\x8eJ2\x9d\xb1\x7f#b;\x05j\xc6C\xd1\xc6\xcd%\x0cGY\xa7\xbf\xf7\xf5\x96\xb0\xdb`\xce\xf7i\x07\r\xad3?`9\xcd\x9e\x9c\x06|\x92\xa9C8#(\x0f\x7f\xc9\x06\xd7\xd0\xdfhB\x0bH\xf5\xb9\xb6\xfc\x82\xa1\xdco\xdf\xcdbE\x01\xa7"&#'), chr(100) + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(0b1011011 + 0o12))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\\\xfc\xe9\x9c\xd7\xdd\xa6\xd1R\xe5\xd1G'), '\144' + chr(0b1100101) + chr(1798 - 1699) + chr(111) + chr(0b1100100) + chr(0b11110 + 0o107))(chr(117) + chr(0b1010011 + 0o41) + '\146' + chr(0b101 + 0o50) + chr(0b111000)))(jK17FCS_1Kbm)) try: pOp6HxxfV61L = qbv483j44Ppy.import_module(pOp6HxxfV61L) except fPFTJxVnGShv as wgf0sgcu_xPL: ju87ICqqBBVp = roI3spqORKae(ES5oEprVxulp(b'\x00\xe2\xb9\xb6\xfc\x82\xa2\xdf`\xd1\xb2lU\x0c\xb7,7o9'), chr(100) + chr(101) + chr(0b1010010 + 0o21) + '\157' + chr(0b1100100) + '\x65')(chr(117) + chr(978 - 862) + '\x66' + chr(1944 - 1899) + '\070') if jG5KU4UUGnk5 else roI3spqORKae(ES5oEprVxulp(b'N\xa0\xb4\xb1\xf9\x89\xb5\xccb\xce\xfbbIK\xa4(>d'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(7345 - 7245) + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(0b101101) + '\070') raise roI3spqORKae(uNNTJtNION1L, roI3spqORKae(ES5oEprVxulp(b'n\xa3\xb3\xb4\xfb\xab\xb8\xddf\xca\xe6dH\x05'), '\x64' + chr(0b1000 + 0o135) + chr(0b1100011) + chr(111) + '\144' + chr(1106 - 1005))('\165' + chr(116) + chr(0b100011 + 0o103) + chr(0b101101) + chr(56)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'k\xae\xb3\xbb\xf5\x8a\xe0\xcal\x9a\xfb`W\x04\xb05ru%\x88\xd7\x8cG2\x93\xb2}+)k\tq\xca\x16\x95\xd8\x90$L\x1a\x04\xef\xaa\xa5\xff\x98\xa9\xdaf\xde\xb2dIK\xb6)7!6\x90'), chr(0b1110 + 0o126) + chr(101) + '\x63' + '\157' + '\144' + chr(5079 - 4978))('\165' + chr(116) + chr(10025 - 9923) + chr(426 - 381) + chr(0b110010 + 0o6)), roI3spqORKae(ES5oEprVxulp(b'\\\xfc\xe9\x9c\xd7\xdd\xa6\xd1R\xe5\xd1G'), chr(6015 - 5915) + chr(7382 - 7281) + chr(0b1100011) + chr(0b1000001 + 0o56) + '\x64' + chr(0b1100101))('\x75' + chr(0b1100110 + 0o16) + '\x66' + chr(1206 - 1161) + chr(0b11010 + 0o36)))(N9zlRy29S1SS(wgf0sgcu_xPL), ju87ICqqBBVp)) try: jG5KU4UUGnk5 = roI3spqORKae(pOp6HxxfV61L, _1vzISbJ_R2i) except bIsJhlpYrrU2 as wgf0sgcu_xPL: raise roI3spqORKae(uNNTJtNION1L, roI3spqORKae(ES5oEprVxulp(b'n\xa3\xb3\xb4\xfb\xab\xb8\xddf\xca\xe6dH\x05'), chr(9191 - 9091) + chr(101) + chr(0b100100 + 0o77) + chr(111) + chr(100) + chr(0b1100101))('\x75' + '\164' + chr(0b100 + 0o142) + chr(1159 - 1114) + chr(2508 - 2452)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'x\xa1\xbb\xb5\xfc\x8b\xe0\xcal\x9a\xfb`W\x04\xb05rz0\xcd\xdf\x94[w\xc4\xf0u;b?\x0c{\x8e\x13\x98\xde\xdbmP\x02\r\xa6\xb4\xa4\xe4\x8f\xac\xd2f\xde\xad-s\x03\xa7a"x9\x85\x98\x81\x06.\x9e\xa4th1#\x0bk\xc2\x07\xd9\xdf\xd5,^\t\r\xbb\xb2\xb2\xb0\x88\xaf\xccn\xdb\xe6-\x05\x06\xbb\x1e"`.\x86\x96\x88Cp\x92\xbfx=..^}\xcf\x0f\x95\xdc\xd2`R8B\xad\xb0\xb2\xf3\x9a\xe2'), chr(8533 - 8433) + chr(0b1100101) + chr(7294 - 7195) + '\157' + '\x64' + chr(0b1100101))(chr(11608 - 11491) + chr(1599 - 1483) + chr(0b1100110) + chr(0b101101) + chr(0b11101 + 0o33)), roI3spqORKae(ES5oEprVxulp(b'\\\xfc\xe9\x9c\xd7\xdd\xa6\xd1R\xe5\xd1G'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b101001 + 0o113) + '\x66' + chr(1723 - 1678) + chr(56)))(jK17FCS_1Kbm, N9zlRy29S1SS(wgf0sgcu_xPL))) if VLbtkEx9kiB5: kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'N\xa3\xb3\xb2\xfe\x9a\x9f\xceq\xd5\xe2hU\x1f\xab$!'), chr(100) + chr(1060 - 959) + chr(99) + '\157' + '\x64' + chr(101))('\x75' + '\164' + '\x66' + '\x2d' + chr(0b111000))][roI3spqORKae(ES5oEprVxulp(b'L\xbf\xaa'), chr(100) + chr(0b1001111 + 0o26) + '\143' + '\157' + chr(0b1100100) + chr(101))(chr(117) + chr(1707 - 1591) + '\x66' + chr(45) + chr(56))] = VLbtkEx9kiB5 roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'D\xb7\x94\xaf\xa9\xa2\xb7\xe12\xdd\xe0B'), chr(0b1100100) + chr(5355 - 5254) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))(chr(117) + chr(6244 - 6128) + chr(102) + chr(0b101010 + 0o3) + '\070'))(roI3spqORKae(ES5oEprVxulp(b"~\xbb\xbb\xa5\xe4\x87\xae\xd9#\xd9\xfdcT\x1e\xaf$ !:\x84\x83\x87\x06{\x8c\xf0\x7f).'\x06\x7f\xcd\x08"), '\x64' + '\145' + chr(0b111011 + 0o50) + '\157' + chr(0b1100100) + chr(806 - 705))('\x75' + chr(4119 - 4003) + '\146' + chr(0b101101) + chr(0b111000)), jK17FCS_1Kbm) try: tAz616s07lsb = Zy5jC95Ko39c.twisted_consume(jG5KU4UUGnk5, bindings=Eov4xKwUG62w, queues=NJajU877lUB0) roI3spqORKae(tAz616s07lsb, roI3spqORKae(ES5oEprVxulp(b'L\xab\xbe\x94\xf1\x82\xac\xdcb\xd9\xf9'), chr(100) + '\145' + '\143' + chr(0b1101111) + chr(0b1010 + 0o132) + chr(0b10101 + 0o120))(chr(117) + chr(116) + chr(0b11011 + 0o113) + chr(1208 - 1163) + '\x38'))(Q4vg16BFn5_T) roI3spqORKae(tAz616s07lsb, roI3spqORKae(ES5oEprVxulp(b'L\xab\xbe\x92\xe2\x9c\xa2\xdf`\xd1'), '\x64' + '\x65' + chr(99) + '\157' + '\x64' + chr(0b1100101))('\x75' + chr(0b101001 + 0o113) + chr(0b1100100 + 0o2) + chr(512 - 467) + chr(644 - 588)))(pAbAOiTW7EsS) except WbNHlDKpyPtQ as wgf0sgcu_xPL: LUf9YNlFf81t = RlNRVik21BGV.get_distribution(roI3spqORKae(ES5oEprVxulp(b'N\xa3\xb3\xb4\xfb'), '\x64' + chr(0b1100101) + chr(2944 - 2845) + chr(0b1001101 + 0o42) + chr(100) + chr(771 - 670))(chr(0b1011100 + 0o31) + chr(6082 - 5966) + chr(102) + '\055' + chr(0b100001 + 0o27))).q49HkiHCAfUC if LUf9YNlFf81t < roI3spqORKae(RlNRVik21BGV, roI3spqORKae(ES5oEprVxulp(b']\xae\xa8\xa4\xf5\xb1\xb6\xdbq\xc9\xfbbI'), chr(100) + '\145' + '\143' + chr(6298 - 6187) + chr(4599 - 4499) + '\145')(chr(0b11001 + 0o134) + chr(0b1110100 + 0o0) + '\146' + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x1a\xe1\xea'), '\x64' + chr(0b1100101) + '\143' + chr(0b11001 + 0o126) + '\x64' + chr(9305 - 9204))(chr(0b1110101) + '\164' + chr(0b101010 + 0o74) + '\x2d' + chr(0b111000))): raise roI3spqORKae(uNNTJtNION1L.exceptions, roI3spqORKae(ES5oEprVxulp(b'o\xae\xbe\x98\xe0\x9a\xa9\xd1m\xef\xe1l@\x0e'), '\144' + '\145' + '\x63' + '\157' + chr(0b110 + 0o136) + '\145')('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + '\x38'))(N9zlRy29S1SS(wgf0sgcu_xPL)) else: raise roI3spqORKae(uNNTJtNION1L.exceptions, roI3spqORKae(ES5oEprVxulp(b'o\xae\xbe\x98\xe0\x9a\xa9\xd1m\xef\xe1l@\x0e'), chr(0b1100100) + '\145' + chr(99) + chr(0b1010100 + 0o33) + chr(0b1100100) + '\x65')('\x75' + '\164' + chr(5368 - 5266) + chr(0b101100 + 0o1) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'N\xae\xb6\xbb\xf2\x8f\xa3\xd5'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1100 + 0o130) + '\145')(chr(0b1101001 + 0o14) + chr(116) + chr(102) + '\055' + '\070'), N9zlRy29S1SS(wgf0sgcu_xPL)) roI3spqORKae(GnrY9NlnDSqS, roI3spqORKae(ES5oEprVxulp(b'\\\xa1\x8a\x98\xd9\x8a\x82\xefI\xde\xe8T'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(100) + '\x65')('\165' + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b101001 + 0o17)))() roI3spqORKae(bpyfpu4kTbwL, roI3spqORKae(ES5oEprVxulp(b'w\xba\xa8\xbd\xf3\xbb\x8c\x8fp\xc9\xd35'), chr(100) + '\145' + chr(99) + chr(0b1000 + 0o147) + chr(0b1001111 + 0o25) + chr(2390 - 2289))(chr(6077 - 5960) + chr(10138 - 10022) + '\x66' + '\055' + chr(56)))(Ny0WsuRHmNlK)
fedora-infra/fedora-messaging
fedora_messaging/cli.py
_consume_errback
def _consume_errback(failure): """Handle any errors that occur during consumer registration.""" global _exit_code if failure.check(exceptions.BadDeclaration): _log.error( "Unable to declare the %s object on the AMQP broker. The " "broker responded with %s. Check permissions for your user.", failure.value.obj_type, failure.value.reason, ) _exit_code = 10 elif failure.check(exceptions.PermissionException): _exit_code = 15 _log.error( "The consumer could not proceed because of a permissions problem: %s", str(failure.value), ) elif failure.check(exceptions.ConnectionException): _exit_code = 14 _log.error(failure.value.reason) else: _exit_code = 11 _log.exception( "An unexpected error (%r) occurred while registering the " "consumer, please report this bug.", failure.value, ) try: reactor.stop() except error.ReactorNotRunning: pass
python
def _consume_errback(failure): """Handle any errors that occur during consumer registration.""" global _exit_code if failure.check(exceptions.BadDeclaration): _log.error( "Unable to declare the %s object on the AMQP broker. The " "broker responded with %s. Check permissions for your user.", failure.value.obj_type, failure.value.reason, ) _exit_code = 10 elif failure.check(exceptions.PermissionException): _exit_code = 15 _log.error( "The consumer could not proceed because of a permissions problem: %s", str(failure.value), ) elif failure.check(exceptions.ConnectionException): _exit_code = 14 _log.error(failure.value.reason) else: _exit_code = 11 _log.exception( "An unexpected error (%r) occurred while registering the " "consumer, please report this bug.", failure.value, ) try: reactor.stop() except error.ReactorNotRunning: pass
[ "def", "_consume_errback", "(", "failure", ")", ":", "global", "_exit_code", "if", "failure", ".", "check", "(", "exceptions", ".", "BadDeclaration", ")", ":", "_log", ".", "error", "(", "\"Unable to declare the %s object on the AMQP broker. The \"", "\"broker responded with %s. Check permissions for your user.\"", ",", "failure", ".", "value", ".", "obj_type", ",", "failure", ".", "value", ".", "reason", ",", ")", "_exit_code", "=", "10", "elif", "failure", ".", "check", "(", "exceptions", ".", "PermissionException", ")", ":", "_exit_code", "=", "15", "_log", ".", "error", "(", "\"The consumer could not proceed because of a permissions problem: %s\"", ",", "str", "(", "failure", ".", "value", ")", ",", ")", "elif", "failure", ".", "check", "(", "exceptions", ".", "ConnectionException", ")", ":", "_exit_code", "=", "14", "_log", ".", "error", "(", "failure", ".", "value", ".", "reason", ")", "else", ":", "_exit_code", "=", "11", "_log", ".", "exception", "(", "\"An unexpected error (%r) occurred while registering the \"", "\"consumer, please report this bug.\"", ",", "failure", ".", "value", ",", ")", "try", ":", "reactor", ".", "stop", "(", ")", "except", "error", ".", "ReactorNotRunning", ":", "pass" ]
Handle any errors that occur during consumer registration.
[ "Handle", "any", "errors", "that", "occur", "during", "consumer", "registration", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/cli.py#L181-L211
train
Handle any errors that occur during consumer registration.
GiP5xwVCF98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dwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x33' + chr(55), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\063' + '\x35', 37635 - 37627), nzTpIcepk0o8(chr(348 - 300) + chr(5078 - 4967) + '\x33' + '\061' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4300 - 4189) + '\x31' + '\x34' + '\061', 15750 - 15742), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\062' + chr(53) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b11110 + 0o31) + '\067', 55018 - 55010), nzTpIcepk0o8(chr(186 - 138) + chr(111) + chr(49) + chr(2344 - 2294) + chr(1353 - 1304), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + '\x33' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2413 - 2361) + chr(2428 - 2377), 61100 - 61092), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + '\x31' + chr(48), 0o10), nzTpIcepk0o8(chr(1185 - 1137) + chr(0b1101111) + chr(52) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(55) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(10660 - 10549) + chr(0b110010) + '\064' + '\065', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x36' + chr(52), 0b1000), nzTpIcepk0o8(chr(961 - 913) + '\157' + '\062' + chr(0b101011 + 0o13) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(9675 - 9564) + '\062' + '\063' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1399 - 1351) + chr(111) + chr(49) + chr(0b1100 + 0o46), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b10 + 0o56) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\x35', 14360 - 14352), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(111 - 62) + chr(0b110010) + chr(0b110001), 8), nzTpIcepk0o8(chr(2035 - 1987) + chr(111) + '\062' + chr(0b110110) + '\x35', 51720 - 51712), nzTpIcepk0o8(chr(0b110000) + chr(0b1001010 + 0o45) + chr(50) + '\060' + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + chr(0b110001) + chr(2218 - 2163) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1546 - 1498) + chr(9405 - 9294) + chr(50), 56215 - 56207), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(48) + '\063', 34996 - 34988), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(704 - 655) + chr(1879 - 1829), ord("\x08")), nzTpIcepk0o8(chr(360 - 312) + '\x6f' + '\x32' + chr(48) + chr(48), 13316 - 13308), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(51) + '\x35' + chr(641 - 587), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7224 - 7113) + chr(1473 - 1423) + chr(0b100101 + 0o15), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(423 - 374) + chr(1219 - 1166), 13466 - 13458), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(1745 - 1696) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2955 - 2844) + '\061' + chr(2324 - 2272) + '\061', 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(51) + chr(0b110000) + chr(2911 - 2856), 0b1000), nzTpIcepk0o8('\x30' + chr(8414 - 8303) + '\x33' + chr(0b10 + 0o61) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(264 - 213) + '\x34' + chr(0b1011 + 0o53), 65010 - 65002), nzTpIcepk0o8('\x30' + chr(2371 - 2260) + chr(0b1000 + 0o56) + chr(0b1111 + 0o44), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\x34' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\063' + '\065', ord("\x08")), nzTpIcepk0o8(chr(1921 - 1873) + chr(0b1101111) + '\062' + '\x34' + chr(297 - 248), 8), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(1863 - 1814) + chr(2239 - 2184), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + '\x35' + chr(0b101100 + 0o4), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf1'), chr(100) + '\145' + chr(99) + chr(111) + chr(0b1100100) + chr(0b110011 + 0o62))(chr(0b1000001 + 0o64) + chr(0b10110 + 0o136) + chr(102) + chr(1737 - 1692) + chr(1231 - 1175)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def pAbAOiTW7EsS(DUbr_vQkcSNT): global Ny0WsuRHmNlK if roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\x8b|\xa46\xd9\xf6`\xd5PbPa'), chr(0b110000 + 0o64) + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + '\x66' + '\x2d' + '\070'))(roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\x9d|\xa8%\xcd\xdc=\xffQiVR\xca\x9a'), chr(8479 - 8379) + chr(4266 - 4165) + chr(0b1100011) + chr(111) + '\x64' + chr(0b10101 + 0o120))('\165' + chr(9923 - 9807) + chr(5538 - 5436) + chr(0b100100 + 0o11) + '\070'))): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xaet\xfd\x16\xc1\xcf\x01\xc8UMi_'), '\x64' + chr(101) + chr(1846 - 1747) + chr(0b1101111) + '\x64' + '\145')(chr(12185 - 12068) + chr(116) + '\x66' + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x8as\xad\x03\xc4\xdaq\xeaL(F^\xc6\x98\xd2\xefo\xe1a9\xd0\xa4Xqc\xa5\xe2\x84w\xae\xbfA\xa8\xb7\xc6G\xc98\x81\x8e\x92L\x9cA\xca\xcd>\xf5Fz\x0c\x1b\xf1\x9c\xd6\xbdh\xb3z:\xd0\xf6]p&\xb9\xf0\x81|\xa9\xae\x05\xe7\xae\x8fG\xc9}\x84\xbc\xf1=\x8f\t\xcd\xdc:\xbeSmPV\xcc\x87\xc0\xf4e\xaffq\xd3\xeb\x0f":\xa5\xf5\x9c2\xb8\xb8\x04\xb5\xf7'), chr(5002 - 4902) + chr(7536 - 7435) + '\143' + '\157' + chr(100) + '\x65')('\x75' + chr(0b1100010 + 0o22) + chr(0b1100110) + chr(1642 - 1597) + chr(0b111000)), roI3spqORKae(DUbr_vQkcSNT.value, roI3spqORKae(ES5oEprVxulp(b'\xb0\x7f\xa6>\xdc\xc6!\xfb'), chr(0b1010101 + 0o17) + chr(101) + chr(320 - 221) + chr(0b1101111) + chr(100) + chr(9379 - 9278))(chr(117) + '\164' + '\146' + chr(45) + chr(2892 - 2836))), roI3spqORKae(DUbr_vQkcSNT.value, roI3spqORKae(ES5oEprVxulp(b"\x8du\xb4'\xee\x89b\xeaa]\x16B"), '\144' + chr(0b110110 + 0o57) + chr(0b1100011) + chr(6871 - 6760) + chr(0b1011011 + 0o11) + '\x65')(chr(0b1100001 + 0o24) + chr(0b1110100) + '\x66' + '\055' + '\070'))) Ny0WsuRHmNlK = nzTpIcepk0o8('\060' + chr(111) + chr(2036 - 1987) + chr(1485 - 1435), 8) elif roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\x8b|\xa46\xd9\xf6`\xd5PbPa'), '\x64' + chr(101) + chr(274 - 175) + chr(0b1001000 + 0o47) + '\x64' + chr(3225 - 3124))('\x75' + chr(116) + chr(6277 - 6175) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\x8fx\xbe\x0c\xc1\xcc"\xf7LfgC\xc6\x91\xc3\xe9c\xae{'), '\144' + '\145' + '\143' + chr(0b1000 + 0o147) + '\144' + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + '\x2d' + chr(0b11100 + 0o34)))): Ny0WsuRHmNlK = nzTpIcepk0o8('\x30' + chr(11468 - 11357) + '\x31' + chr(55), 75 - 67) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xaet\xfd\x16\xc1\xcf\x01\xc8UMi_'), chr(9494 - 9394) + chr(244 - 143) + chr(0b1000101 + 0o36) + '\x6f' + '\x64' + chr(101))(chr(1129 - 1012) + chr(0b1110100) + '\146' + chr(131 - 86) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x8bu\xa9A\xcb\xd0?\xedVeGI\x85\x97\xdc\xe8f\xa55?\xda\xf0]r1\xa5\xe3\x8bw\xa9\xeb\x03\xa2\xba\x87F\xd28\x81\xa0\xb9=\xadA\xd8\xda#\xf3J{QR\xca\x9a\xc0\xbdz\xb3z3\xd9\xe1\x108c\xef\xf3'), '\144' + '\145' + chr(0b1000100 + 0o37) + chr(111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000)), N9zlRy29S1SS(roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\xaaK\xf5\x08\xea\xd6&\xaeZWoK'), '\x64' + chr(0b1100010 + 0o3) + chr(0b1001100 + 0o27) + chr(3816 - 3705) + chr(100) + '\145')('\165' + chr(116) + '\146' + '\x2d' + chr(0b10100 + 0o44))))) elif roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\x8b|\xa46\xd9\xf6`\xd5PbPa'), chr(0b1001010 + 0o32) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(1721 - 1604) + chr(2849 - 2733) + chr(102) + chr(1288 - 1243) + chr(0b111000)))(roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\x9cr\xa2\x0f\xcd\xdc%\xf7LfgC\xc6\x91\xc3\xe9c\xae{'), '\144' + chr(101) + '\143' + chr(3669 - 3558) + '\144' + chr(101))(chr(0b1110101) + '\x74' + chr(2071 - 1969) + '\x2d' + chr(56)))): Ny0WsuRHmNlK = nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(54), 0b1000) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xaet\xfd\x16\xc1\xcf\x01\xc8UMi_'), '\x64' + chr(0b1100011 + 0o2) + chr(0b1000001 + 0o42) + '\157' + chr(0b1100100) + chr(0b10100 + 0o121))('\165' + chr(116) + chr(0b1000 + 0o136) + chr(0b101101) + chr(2514 - 2458)))(roI3spqORKae(DUbr_vQkcSNT.value, roI3spqORKae(ES5oEprVxulp(b"\x8du\xb4'\xee\x89b\xeaa]\x16B"), chr(0b10001 + 0o123) + chr(101) + chr(1281 - 1182) + chr(11568 - 11457) + chr(2502 - 2402) + chr(1818 - 1717))(chr(0b101110 + 0o107) + chr(689 - 573) + '\x66' + chr(0b10011 + 0o32) + '\070'))) else: Ny0WsuRHmNlK = nzTpIcepk0o8('\x30' + chr(0b1111 + 0o140) + chr(49) + '\x33', 0o10) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xad~\x80\x00\xe2\xdd2\xd4nklM'), chr(0b100010 + 0o102) + chr(2469 - 2368) + chr(0b1011111 + 0o4) + '\x6f' + '\144' + '\145')(chr(6869 - 6752) + chr(444 - 328) + chr(102) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x9es\xec\x14\xc6\xda)\xeeFkV^\xc1\xd4\xd6\xefx\xaegq\x9d\xa1\x0f+c\xa5\xe3\x8dg\xbf\xb9\x04\xa3\xf9\x91[\xc81\xc4\xef\xadx\xab\x08\xdb\xcb4\xecJfE\x1b\xd1\x9c\xd6\xbdi\xae{"\xc0\xe9\x18po\xea\xf0\x82w\xac\xb8\x04\xe7\xab\x83C\xce/\xd5\xef\xabu\xa5\x12\x88\xdd$\xf9\r'), chr(0b1011111 + 0o5) + chr(0b1100101) + chr(0b1011101 + 0o6) + chr(0b1000010 + 0o55) + chr(1797 - 1697) + chr(0b1011000 + 0o15))(chr(117) + chr(10087 - 9971) + chr(0b110 + 0o140) + chr(0b101011 + 0o2) + chr(2834 - 2778)), roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\xaaK\xf5\x08\xea\xd6&\xaeZWoK'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101111) + '\x64' + chr(101))(chr(11024 - 10907) + chr(8576 - 8460) + '\146' + chr(45) + '\070'))) try: roI3spqORKae(GnrY9NlnDSqS, roI3spqORKae(ES5oEprVxulp(b'\xbbD\x86\x03\xea\xd6\x08\xd1|fe~'), '\144' + '\145' + '\143' + chr(0b1100 + 0o143) + chr(100) + chr(0b1100101))(chr(0b1111 + 0o146) + '\164' + chr(102) + chr(45) + chr(0b111000)))() except roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b'\x8dx\xad\x02\xdc\xd0#\xd0L|pN\xcb\x9a\xda\xf3m'), chr(0b1001100 + 0o30) + chr(0b1100101) + chr(0b1100011) + chr(0b1100100 + 0o13) + '\x64' + chr(0b1001010 + 0o33))(chr(8755 - 8638) + chr(11123 - 11007) + '\146' + chr(322 - 277) + chr(0b0 + 0o70))): pass
fedora-infra/fedora-messaging
fedora_messaging/cli.py
_consume_callback
def _consume_callback(consumers): """ Callback when consumers are successfully registered. This simply registers callbacks for consumer.result deferred object which fires when the consumer stops. Args consumers (list of fedora_messaging.api.Consumer): The list of consumers that were successfully created. """ for consumer in consumers: def errback(failure): global _exit_code if failure.check(exceptions.HaltConsumer): _exit_code = failure.value.exit_code if _exit_code: _log.error( "Consumer halted with non-zero exit code (%d): %s", _exit_code, str(failure.value.reason), ) elif failure.check(exceptions.ConsumerCanceled): _exit_code = 12 _log.error( "The consumer was canceled server-side, check with system administrators." ) elif failure.check(exceptions.PermissionException): _exit_code = 15 _log.error( "The consumer could not proceed because of a permissions problem: %s", str(failure.value), ) else: _exit_code = 13 _log.error( "Unexpected error occurred in consumer %r: %r", consumer, failure ) try: reactor.stop() except error.ReactorNotRunning: pass def callback(consumer): _log.info("The %r consumer halted.", consumer) if all([c.result.called for c in consumers]): _log.info("All consumers have stopped; shutting down.") try: # Last consumer out shuts off the lights reactor.stop() except error.ReactorNotRunning: pass consumer.result.addCallbacks(callback, errback)
python
def _consume_callback(consumers): """ Callback when consumers are successfully registered. This simply registers callbacks for consumer.result deferred object which fires when the consumer stops. Args consumers (list of fedora_messaging.api.Consumer): The list of consumers that were successfully created. """ for consumer in consumers: def errback(failure): global _exit_code if failure.check(exceptions.HaltConsumer): _exit_code = failure.value.exit_code if _exit_code: _log.error( "Consumer halted with non-zero exit code (%d): %s", _exit_code, str(failure.value.reason), ) elif failure.check(exceptions.ConsumerCanceled): _exit_code = 12 _log.error( "The consumer was canceled server-side, check with system administrators." ) elif failure.check(exceptions.PermissionException): _exit_code = 15 _log.error( "The consumer could not proceed because of a permissions problem: %s", str(failure.value), ) else: _exit_code = 13 _log.error( "Unexpected error occurred in consumer %r: %r", consumer, failure ) try: reactor.stop() except error.ReactorNotRunning: pass def callback(consumer): _log.info("The %r consumer halted.", consumer) if all([c.result.called for c in consumers]): _log.info("All consumers have stopped; shutting down.") try: # Last consumer out shuts off the lights reactor.stop() except error.ReactorNotRunning: pass consumer.result.addCallbacks(callback, errback)
[ "def", "_consume_callback", "(", "consumers", ")", ":", "for", "consumer", "in", "consumers", ":", "def", "errback", "(", "failure", ")", ":", "global", "_exit_code", "if", "failure", ".", "check", "(", "exceptions", ".", "HaltConsumer", ")", ":", "_exit_code", "=", "failure", ".", "value", ".", "exit_code", "if", "_exit_code", ":", "_log", ".", "error", "(", "\"Consumer halted with non-zero exit code (%d): %s\"", ",", "_exit_code", ",", "str", "(", "failure", ".", "value", ".", "reason", ")", ",", ")", "elif", "failure", ".", "check", "(", "exceptions", ".", "ConsumerCanceled", ")", ":", "_exit_code", "=", "12", "_log", ".", "error", "(", "\"The consumer was canceled server-side, check with system administrators.\"", ")", "elif", "failure", ".", "check", "(", "exceptions", ".", "PermissionException", ")", ":", "_exit_code", "=", "15", "_log", ".", "error", "(", "\"The consumer could not proceed because of a permissions problem: %s\"", ",", "str", "(", "failure", ".", "value", ")", ",", ")", "else", ":", "_exit_code", "=", "13", "_log", ".", "error", "(", "\"Unexpected error occurred in consumer %r: %r\"", ",", "consumer", ",", "failure", ")", "try", ":", "reactor", ".", "stop", "(", ")", "except", "error", ".", "ReactorNotRunning", ":", "pass", "def", "callback", "(", "consumer", ")", ":", "_log", ".", "info", "(", "\"The %r consumer halted.\"", ",", "consumer", ")", "if", "all", "(", "[", "c", ".", "result", ".", "called", "for", "c", "in", "consumers", "]", ")", ":", "_log", ".", "info", "(", "\"All consumers have stopped; shutting down.\"", ")", "try", ":", "# Last consumer out shuts off the lights", "reactor", ".", "stop", "(", ")", "except", "error", ".", "ReactorNotRunning", ":", "pass", "consumer", ".", "result", ".", "addCallbacks", "(", "callback", ",", "errback", ")" ]
Callback when consumers are successfully registered. This simply registers callbacks for consumer.result deferred object which fires when the consumer stops. Args consumers (list of fedora_messaging.api.Consumer): The list of consumers that were successfully created.
[ "Callback", "when", "consumers", "are", "successfully", "registered", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/cli.py#L214-L268
train
Callback when consumers are successfully registered.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUv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d1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(829 - 781) + '\x6f' + chr(49) + chr(2345 - 2291) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(8722 - 8611) + '\x33' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + chr(0b10011 + 0o43) + '\060', 29008 - 29000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b110101) + chr(783 - 732), 5845 - 5837), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + '\063' + '\x35' + chr(0b100011 + 0o15), 0o10), nzTpIcepk0o8(chr(2116 - 2068) + chr(0b100110 + 0o111) + '\061' + chr(49) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + '\061' + '\x34' + '\060', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1000111 + 0o50) + '\063' + '\x30' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(11434 - 11323) + chr(49) + chr(50) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11010 + 0o30) + '\062' + chr(48), 0b1000), nzTpIcepk0o8(chr(583 - 535) + '\157' + chr(418 - 368) + chr(1832 - 1780) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b111001 + 0o66) + '\062' + '\066' + chr(871 - 816), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(185 - 134) + chr(0b10111 + 0o33) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x35' + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(2255 - 2206) + chr(49), 0o10), nzTpIcepk0o8(chr(983 - 935) + chr(3507 - 3396) + chr(0b110001) + chr(0b110010), 24588 - 24580), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1964 - 1914) + '\x37' + chr(0b110100 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\061' + chr(50), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(1913 - 1864) + '\066', 46277 - 46269), nzTpIcepk0o8(chr(186 - 138) + '\157' + chr(0b100 + 0o56) + chr(48) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(660 - 608) + chr(1523 - 1475), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2151 - 2040) + chr(104 - 55) + chr(0b110010) + chr(483 - 435), 0o10), nzTpIcepk0o8(chr(48) + chr(10396 - 10285) + '\x31' + chr(1101 - 1051) + chr(0b11011 + 0o33), 6136 - 6128), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + '\x32' + '\x30' + '\060', 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b100000 + 0o117) + chr(0b110010) + chr(0b110111) + chr(0b100111 + 0o13), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\x36' + chr(1290 - 1236), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x34' + chr(2240 - 2191), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(2085 - 1974) + chr(49) + chr(938 - 885) + chr(0b11100 + 0o30), 40623 - 40615), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b110011) + chr(0b11100 + 0o30), 0b1000), nzTpIcepk0o8('\060' + chr(653 - 542) + chr(51) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(1502 - 1452) + chr(52), 0b1000), nzTpIcepk0o8(chr(1919 - 1871) + chr(0b1101111) + chr(234 - 183) + chr(0b100110 + 0o17) + chr(0b110010), 24917 - 24909), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(116 - 67) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(54) + '\x36', 0o10), nzTpIcepk0o8(chr(2276 - 2228) + '\157' + '\062' + '\067' + chr(0b110111), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001 + 0o0) + chr(0b1101 + 0o45) + chr(0b1001 + 0o53), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110001) + '\063', 0b1000), nzTpIcepk0o8(chr(623 - 575) + '\157' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x35' + '\063', 59384 - 59376)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100001 + 0o24) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'['), chr(0b1100100) + chr(0b1010100 + 0o21) + chr(0b1100011) + chr(5876 - 5765) + chr(100) + '\x65')('\165' + chr(116) + chr(9137 - 9035) + chr(0b100110 + 0o7) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Q4vg16BFn5_T(yRp8ZLirPPOG): for Fz9tLfvnh2vf in yRp8ZLirPPOG: def Hc18F0E0pGOA(DUbr_vQkcSNT): global Ny0WsuRHmNlK if roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'!|X\xfc\x99\x07Q\x8a$\xfa\xd4\xed'), chr(100) + chr(101) + chr(0b1100011) + chr(0b110 + 0o151) + chr(0b1100100) + chr(0b1100101))(chr(0b11001 + 0o134) + chr(12521 - 12405) + chr(0b1100110) + chr(0b11101 + 0o20) + '\x38'))(roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'=|\\\xdf\xab!\x0e\xb2"\xfd\xc3\xc5'), chr(3462 - 3362) + chr(101) + chr(2066 - 1967) + chr(0b1000000 + 0o57) + chr(100) + chr(101))('\x75' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))): Ny0WsuRHmNlK = DUbr_vQkcSNT.value.VEfvlc5zZEfb if Ny0WsuRHmNlK: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x04t\x01\xdc\x81>0\x97!\xd5\xed\xd3'), chr(8735 - 8635) + chr(0b10100 + 0o121) + chr(9217 - 9118) + chr(0b111101 + 0o62) + '\144' + chr(6929 - 6828))(chr(117) + '\x74' + chr(8514 - 8412) + '\x2d' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'6r^\xd8\x9d#\x05\xb3w\xf8\xc7\xdb\xa7\x0c\xed*\xc8c\xfa\xe8\x00>9\xee\x97\xcc\x04\x1e\xf38\xb1\x92fB\x9f7\xc0\xafa\x0b]8T\x82\xd2nE\xb2'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + '\145')(chr(0b1101011 + 0o12) + chr(0b1110100) + chr(102) + chr(45) + chr(0b111000)), Ny0WsuRHmNlK, N9zlRy29S1SS(roI3spqORKae(DUbr_vQkcSNT.value, roI3spqORKae(ES5oEprVxulp(b"'uH\xed\xaexS\xb5\x15\xc5\x92\xce"), '\x64' + chr(101) + chr(0b1100011) + chr(0b1000011 + 0o54) + '\x64' + chr(101))(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(0b111000))))) elif roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'!|X\xfc\x99\x07Q\x8a$\xfa\xd4\xed'), chr(100) + '\x65' + chr(0b111010 + 0o51) + chr(1113 - 1002) + '\144' + chr(101))('\165' + chr(116) + chr(0b101000 + 0o76) + '\055' + chr(2717 - 2661)))(roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'6r^\xd8\x9d#\x05\xb3\x14\xf1\xc8\xd4\xb6\x05\xecn'), '\x64' + chr(101) + chr(0b101000 + 0o73) + chr(111) + chr(100) + '\145')(chr(0b1100100 + 0o21) + '\x74' + '\x66' + chr(0b101101) + chr(0b1100 + 0o54)))): Ny0WsuRHmNlK = nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10 + 0o57) + '\064', ord("\x08")) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x04t\x01\xdc\x81>0\x97!\xd5\xed\xd3'), '\144' + chr(0b1100101) + chr(6811 - 6712) + chr(111) + chr(0b1000001 + 0o43) + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(616 - 571) + chr(881 - 825)))(roI3spqORKae(ES5oEprVxulp(b'!uU\x8b\x8b!\x0e\xb2"\xfd\xc3\xc5\xf3\x1e\xe8y\x9fi\xef\xeeC5:\xe5\xde\x96\x12\t\xeen\xb1\x98"E\xd60\xca\xe7$H\x1dxS\xc0\xc89\t\xb5?\xb0\xd5\xce\xa0\x1d\xecg\x9fk\xea\xedI>?\xf3\xce\xc4\x00\x18\xf3j\xa7\xc4'), chr(2800 - 2700) + chr(101) + chr(6143 - 6044) + chr(9443 - 9332) + '\x64' + chr(6952 - 6851))('\165' + chr(116) + chr(102) + '\x2d' + chr(0b111000 + 0o0))) elif roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'!|X\xfc\x99\x07Q\x8a$\xfa\xd4\xed'), chr(298 - 198) + chr(101) + chr(0b1100011) + chr(12003 - 11892) + '\144' + chr(0b1 + 0o144))(chr(6561 - 6444) + chr(116) + chr(0b101010 + 0o74) + chr(45) + chr(0b11010 + 0o36)))(roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'%xB\xc6\x81=\x13\xa88\xfe\xe3\xcf\xb0\x0c\xf9~\xd6e\xe0'), '\144' + chr(101) + chr(1710 - 1611) + '\x6f' + '\144' + chr(4310 - 4209))('\x75' + chr(116) + chr(0b1100010 + 0o4) + chr(45) + chr(0b110100 + 0o4)))): Ny0WsuRHmNlK = nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1846 - 1797) + chr(0b110111), 8) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x04t\x01\xdc\x81>0\x97!\xd5\xed\xd3'), '\x64' + chr(0b101011 + 0o72) + '\x63' + chr(0b1101111) + chr(0b110011 + 0o61) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + chr(0b100110 + 0o7) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'!uU\x8b\x8b!\x0e\xb2"\xfd\xc3\xc5\xf3\n\xe6\x7f\xd3n\xae\xeeO$v\xf0\xc8\xd9\x02\t\xf9|\xf4\x88jU\xde!\xdc\xae$D\x13=Q\x8b\x98+\x12\xac>\xe3\xd5\xde\xbc\x07\xfa*\xcfx\xe1\xe2L5;\xba\x9a\x93\x12'), chr(0b1100100) + chr(101) + chr(1667 - 1568) + chr(0b1010011 + 0o34) + chr(0b1100100) + chr(101))(chr(593 - 476) + chr(0b1110100) + chr(0b1000101 + 0o41) + chr(45) + '\070'), N9zlRy29S1SS(roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b"\x00K\t\xc2\xaa'\x17\xf1.\xcf\xeb\xc7"), chr(9625 - 9525) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(5397 - 5296))('\165' + chr(116) + chr(2840 - 2738) + chr(45) + '\x38')))) else: Ny0WsuRHmNlK = nzTpIcepk0o8(chr(48) + '\x6f' + chr(1448 - 1399) + chr(0b100 + 0o61), 0o10) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x04t\x01\xdc\x81>0\x97!\xd5\xed\xd3'), chr(600 - 500) + chr(0b1100101) + chr(99) + chr(111) + '\144' + '\x65')('\165' + chr(116) + '\x66' + chr(0b1110 + 0o37) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b' sU\xd3\x98+\x03\xb52\xf4\x86\xd2\xa1\x1b\xe6x\x9fe\xed\xe3U"$\xe5\xde\x96\x08\x02\xbc{\xbb\x84|C\xd21\xdd\xeb!YO=\x15\xd9'), '\144' + chr(101) + chr(99) + chr(111) + '\144' + chr(0b1010100 + 0o21))(chr(3130 - 3013) + '\x74' + '\x66' + chr(206 - 161) + '\070'), Fz9tLfvnh2vf, DUbr_vQkcSNT) try: roI3spqORKae(GnrY9NlnDSqS, roI3spqORKae(ES5oEprVxulp(b"\x11Dz\xc9\xaa'9\x8e\x08\xfe\xe1\xf2"), chr(1239 - 1139) + chr(9105 - 9004) + '\x63' + chr(1279 - 1168) + chr(5942 - 5842) + chr(0b1100011 + 0o2))('\x75' + '\164' + chr(5789 - 5687) + chr(0b101101) + chr(0b111000)))() except roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b"'xQ\xc8\x9c!\x12\x8f8\xe4\xf4\xc2\xbd\x07\xe0d\xd8"), '\144' + '\145' + chr(6768 - 6669) + chr(0b100 + 0o153) + '\x64' + '\x65')(chr(0b10101 + 0o140) + chr(0b1110100) + chr(0b1100110) + chr(867 - 822) + chr(0b101010 + 0o16))): pass def jG5KU4UUGnk5(Fz9tLfvnh2vf): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x1ce~\xd3\xd1\x02\x17\x9ef\xf7\xd4\xf8'), '\x64' + chr(101) + chr(0b11010 + 0o111) + chr(1440 - 1329) + chr(0b1100100) + chr(0b11000 + 0o115))(chr(0b1010 + 0o153) + chr(0b1110100) + chr(1040 - 938) + '\x2d' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'!uU\x8b\xcd<@\xa28\xfe\xd5\xc2\xbe\x0c\xfb*\xd7k\xe2\xf4E4x'), chr(0b111101 + 0o47) + chr(0b1000 + 0o135) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b100000 + 0o125) + chr(116) + chr(102) + '\055' + chr(3039 - 2983)), Fz9tLfvnh2vf) if qX60lO1lgHA5([roI3spqORKae(teUmM7cKWZUa.result, roI3spqORKae(ES5oEprVxulp(b'\x12xB\x9a\xdd\x1a\x10\x96\x05\xc0\xcf\xfa'), chr(0b10001 + 0o123) + chr(0b1100101) + '\x63' + chr(111) + chr(0b111111 + 0o45) + '\145')(chr(117) + chr(116) + '\146' + chr(0b101101) + chr(56))) for teUmM7cKWZUa in yRp8ZLirPPOG]): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x1ce~\xd3\xd1\x02\x17\x9ef\xf7\xd4\xf8'), chr(0b1100100) + chr(0b111011 + 0o52) + chr(0b111011 + 0o50) + chr(9856 - 9745) + chr(0b1000011 + 0o41) + chr(0b1100101))(chr(0b1011000 + 0o35) + chr(0b1110100) + '\146' + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'4q\\\x8b\x8b!\x0e\xb2"\xfd\xc3\xc5\xa0I\xe1k\xc9o\xae\xf3T?&\xf0\xdf\xd2ZL\xefp\xa1\x9e{_\xd13\x8f\xafk\\\x1b3'), '\x64' + chr(101) + '\143' + chr(5621 - 5510) + '\x64' + chr(2832 - 2731))('\x75' + chr(116) + '\146' + '\x2d' + chr(56))) try: roI3spqORKae(GnrY9NlnDSqS, roI3spqORKae(ES5oEprVxulp(b"\x11Dz\xc9\xaa'9\x8e\x08\xfe\xe1\xf2"), chr(0b10001 + 0o123) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(3664 - 3563))(chr(117) + chr(5819 - 5703) + '\146' + chr(0b100011 + 0o12) + chr(1778 - 1722)))() except roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b"'xQ\xc8\x9c!\x12\x8f8\xe4\xf4\xc2\xbd\x07\xe0d\xd8"), '\144' + chr(1033 - 932) + '\x63' + '\x6f' + '\144' + chr(4128 - 4027))('\165' + chr(0b1000110 + 0o56) + chr(102) + chr(1874 - 1829) + chr(2151 - 2095))): pass roI3spqORKae(Fz9tLfvnh2vf.result, roI3spqORKae(ES5oEprVxulp(b'\x14yT\xe8\x89"\x0c\xa36\xf3\xcd\xc4'), chr(2657 - 2557) + '\145' + '\143' + chr(111) + chr(100) + '\145')('\165' + chr(116) + chr(2999 - 2897) + chr(0b101101) + chr(3131 - 3075)))(jG5KU4UUGnk5, Hc18F0E0pGOA)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
_add_timeout
def _add_timeout(deferred, timeout): """ Add a timeout to the given deferred. This is designed to work with both old Twisted and versions of Twisted with the addTimeout API. This is exclusively to support EL7. The deferred will errback with a :class:`defer.CancelledError` if the version of Twisted being used doesn't have the ``defer.Deferred.addTimeout`` API, otherwise it will errback with the normal ``error.TimeoutError`` """ try: deferred.addTimeout(timeout, reactor) except AttributeError: # Twisted 12.2 (in EL7) does not have the addTimeout API, so make do with # the slightly more annoying approach of scheduling a call to cancel which # is then canceled if the deferred succeeds before the timeout is up. delayed_cancel = reactor.callLater(timeout, deferred.cancel) def cancel_cancel_call(result): """Halt the delayed call to cancel if the deferred fires before the timeout.""" if not delayed_cancel.called: delayed_cancel.cancel() return result deferred.addBoth(cancel_cancel_call)
python
def _add_timeout(deferred, timeout): """ Add a timeout to the given deferred. This is designed to work with both old Twisted and versions of Twisted with the addTimeout API. This is exclusively to support EL7. The deferred will errback with a :class:`defer.CancelledError` if the version of Twisted being used doesn't have the ``defer.Deferred.addTimeout`` API, otherwise it will errback with the normal ``error.TimeoutError`` """ try: deferred.addTimeout(timeout, reactor) except AttributeError: # Twisted 12.2 (in EL7) does not have the addTimeout API, so make do with # the slightly more annoying approach of scheduling a call to cancel which # is then canceled if the deferred succeeds before the timeout is up. delayed_cancel = reactor.callLater(timeout, deferred.cancel) def cancel_cancel_call(result): """Halt the delayed call to cancel if the deferred fires before the timeout.""" if not delayed_cancel.called: delayed_cancel.cancel() return result deferred.addBoth(cancel_cancel_call)
[ "def", "_add_timeout", "(", "deferred", ",", "timeout", ")", ":", "try", ":", "deferred", ".", "addTimeout", "(", "timeout", ",", "reactor", ")", "except", "AttributeError", ":", "# Twisted 12.2 (in EL7) does not have the addTimeout API, so make do with", "# the slightly more annoying approach of scheduling a call to cancel which", "# is then canceled if the deferred succeeds before the timeout is up.", "delayed_cancel", "=", "reactor", ".", "callLater", "(", "timeout", ",", "deferred", ".", "cancel", ")", "def", "cancel_cancel_call", "(", "result", ")", ":", "\"\"\"Halt the delayed call to cancel if the deferred fires before the timeout.\"\"\"", "if", "not", "delayed_cancel", ".", "called", ":", "delayed_cancel", ".", "cancel", "(", ")", "return", "result", "deferred", ".", "addBoth", "(", "cancel_cancel_call", ")" ]
Add a timeout to the given deferred. This is designed to work with both old Twisted and versions of Twisted with the addTimeout API. This is exclusively to support EL7. The deferred will errback with a :class:`defer.CancelledError` if the version of Twisted being used doesn't have the ``defer.Deferred.addTimeout`` API, otherwise it will errback with the normal ``error.TimeoutError``
[ "Add", "a", "timeout", "to", "the", "given", "deferred", ".", "This", "is", "designed", "to", "work", "with", "both", "old", "Twisted", "and", "versions", "of", "Twisted", "with", "the", "addTimeout", "API", ".", "This", "is", "exclusively", "to", "support", "EL7", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L72-L97
train
Add a timeout to the given deferred.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DH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VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110011) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + '\x32' + chr(0b110010) + '\x32', 8757 - 8749), nzTpIcepk0o8(chr(48) + chr(8591 - 8480) + '\x32' + '\x36' + chr(0b110011), 28868 - 28860), nzTpIcepk0o8(chr(745 - 697) + '\x6f' + chr(51) + chr(0b11000 + 0o36) + '\060', 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b10100 + 0o133) + '\x31' + '\067' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\064' + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b11 + 0o56) + '\x32' + '\060', 35163 - 35155), nzTpIcepk0o8(chr(48) + chr(0b1101011 + 0o4) + '\x31' + '\067' + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110100) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(599 - 551) + chr(111) + chr(1000 - 950) + chr(993 - 944) + chr(1413 - 1362), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(52) + chr(0b110011), 16453 - 16445), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\065' + chr(52), 47846 - 47838), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(6083 - 5972) + chr(0b1011 + 0o53) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7897 - 7786) + chr(0b110011) + chr(0b10000 + 0o45) + chr(1729 - 1681), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(51) + chr(53), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(9500 - 9389) + chr(50) + '\064' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(7198 - 7087) + chr(0b110010) + chr(0b110100) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3155 - 3044) + '\x33' + chr(0b101 + 0o62) + chr(0b101110 + 0o3), 0o10), nzTpIcepk0o8('\x30' + chr(0b110 + 0o151) + '\061' + chr(0b110010) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1409 - 1361) + chr(0b1101111) + chr(49) + chr(983 - 934) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(2137 - 2089) + chr(111) + chr(52) + chr(0b101110 + 0o2), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x34' + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(1477 - 1366) + chr(50) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8034 - 7923) + chr(0b11100 + 0o25) + '\065' + chr(1740 - 1687), ord("\x08")), nzTpIcepk0o8(chr(1977 - 1929) + chr(9974 - 9863) + chr(0b11110 + 0o30) + chr(2456 - 2403), 25591 - 25583), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2115 - 2066) + '\061' + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1121 - 1070) + chr(0b100011 + 0o23) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(576 - 527) + chr(1481 - 1428) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101110 + 0o5) + chr(48) + chr(192 - 142), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\x37' + chr(55), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(51) + '\x37' + chr(0b110000), 30209 - 30201), nzTpIcepk0o8(chr(737 - 689) + chr(0b1101111) + '\x32' + chr(0b110101) + chr(0b10101 + 0o42), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000000 + 0o57) + chr(0b100111 + 0o14) + chr(54) + chr(0b1010 + 0o46), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(48) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(524 - 474) + '\065' + chr(0b110100), 8), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b100110 + 0o20) + chr(0b101110 + 0o11), 16728 - 16720), nzTpIcepk0o8(chr(1596 - 1548) + '\x6f' + chr(0b110010 + 0o1) + chr(0b101100 + 0o5) + chr(0b101111 + 0o10), 0b1000), nzTpIcepk0o8(chr(48) + chr(2359 - 2248) + chr(1510 - 1459) + chr(0b110001) + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b101 + 0o56) + chr(0b110 + 0o53), 53986 - 53978)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101) + chr(1605 - 1557), 51657 - 51649)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb4'), chr(0b110100 + 0o60) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(9309 - 9208))(chr(0b111100 + 0o71) + chr(0b1110100) + chr(102) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def v5TMCleKRusB(VTs7CTDkBstx, ACACUUFQsMpr): try: roI3spqORKae(VTs7CTDkBstx, roI3spqORKae(ES5oEprVxulp(b'\xfb\xf6\xd7\xa4\x16K5\x15\x17\xff'), chr(0b1100100) + chr(0b110 + 0o137) + chr(99) + chr(6457 - 6346) + chr(0b11010 + 0o112) + chr(101))(chr(0b1110101) + '\x74' + '\146' + '\x2d' + '\x38'))(ACACUUFQsMpr, GnrY9NlnDSqS) except bIsJhlpYrrU2: pGwiVD7kcuR3 = GnrY9NlnDSqS.callLater(ACACUUFQsMpr, VTs7CTDkBstx.cancel) def GT7nypsW3nat(POx95m7SPOVy): if not roI3spqORKae(pGwiVD7kcuR3, roI3spqORKae(ES5oEprVxulp(b'\xfd\xf7\xc1\xc1Jr -0\xdb\xca\xe1'), '\x64' + '\145' + chr(0b10010 + 0o121) + '\x6f' + chr(0b1010010 + 0o22) + '\x65')(chr(0b1110101 + 0o0) + '\164' + chr(102) + '\x2d' + '\070')): roI3spqORKae(pGwiVD7kcuR3, roI3spqORKae(ES5oEprVxulp(b'\xf9\xf3\xdd\x93\x1aJ'), chr(0b110001 + 0o63) + '\145' + chr(99) + chr(0b1101111) + '\x64' + chr(101))('\165' + '\x74' + chr(102) + chr(0b100101 + 0o10) + chr(56)))() return POx95m7SPOVy roI3spqORKae(VTs7CTDkBstx, roI3spqORKae(ES5oEprVxulp(b'\xfb\xf6\xd7\xb2\x10R8'), chr(0b1000 + 0o134) + chr(0b1000000 + 0o45) + '\143' + chr(111) + chr(100) + '\145')('\x75' + '\x74' + chr(102) + chr(0b101101 + 0o0) + '\070'))(GT7nypsW3nat)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2._allocate_channel
def _allocate_channel(self): """ Allocate a new AMQP channel. Raises: NoFreeChannels: If this connection has reached its maximum number of channels. """ try: channel = yield self.channel() except pika.exceptions.NoFreeChannels: raise NoFreeChannels() _std_log.debug("Created AMQP channel id %d", channel.channel_number) if self._confirms: yield channel.confirm_delivery() defer.returnValue(channel)
python
def _allocate_channel(self): """ Allocate a new AMQP channel. Raises: NoFreeChannels: If this connection has reached its maximum number of channels. """ try: channel = yield self.channel() except pika.exceptions.NoFreeChannels: raise NoFreeChannels() _std_log.debug("Created AMQP channel id %d", channel.channel_number) if self._confirms: yield channel.confirm_delivery() defer.returnValue(channel)
[ "def", "_allocate_channel", "(", "self", ")", ":", "try", ":", "channel", "=", "yield", "self", ".", "channel", "(", ")", "except", "pika", ".", "exceptions", ".", "NoFreeChannels", ":", "raise", "NoFreeChannels", "(", ")", "_std_log", ".", "debug", "(", "\"Created AMQP channel id %d\"", ",", "channel", ".", "channel_number", ")", "if", "self", ".", "_confirms", ":", "yield", "channel", ".", "confirm_delivery", "(", ")", "defer", ".", "returnValue", "(", "channel", ")" ]
Allocate a new AMQP channel. Raises: NoFreeChannels: If this connection has reached its maximum number of channels.
[ "Allocate", "a", "new", "AMQP", "channel", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L131-L145
train
Allocate a new AMQP channel.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq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JNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + '\x33' + chr(0b110001 + 0o0), 0o10), nzTpIcepk0o8(chr(2226 - 2178) + chr(111) + chr(1626 - 1577) + '\063' + '\x35', 32344 - 32336), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(2436 - 2385) + chr(55), 23157 - 23149), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(334 - 286) + chr(2530 - 2475), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2296 - 2247) + '\x33' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(11870 - 11759) + chr(0b10100 + 0o36) + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\067' + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(5797 - 5686) + chr(50) + chr(0b110000 + 0o6) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101101 + 0o102) + chr(1424 - 1372) + chr(0b10101 + 0o36), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\067' + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(7600 - 7489) + '\x33' + chr(0b110001) + chr(337 - 289), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1101 + 0o45) + '\x30' + chr(55), 8), nzTpIcepk0o8(chr(1554 - 1506) + '\157' + chr(0b110001) + '\067' + '\x30', 9134 - 9126), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110101) + chr(52), 40126 - 40118), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(54) + chr(1026 - 971), 0o10), nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + chr(217 - 163) + '\066', 60247 - 60239), nzTpIcepk0o8(chr(732 - 684) + chr(6974 - 6863) + chr(0b110010) + chr(1220 - 1170) + '\x35', 10759 - 10751), nzTpIcepk0o8(chr(60 - 12) + '\157' + chr(51) + chr(0b11001 + 0o30) + chr(0b10001 + 0o42), 0o10), nzTpIcepk0o8(chr(48) + chr(2201 - 2090) + '\062' + chr(53) + '\x37', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(10643 - 10532) + chr(0b110001) + '\067' + chr(595 - 540), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(113 - 64) + chr(53) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b101000 + 0o16) + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(0b1011 + 0o51) + chr(1278 - 1230), ord("\x08")), nzTpIcepk0o8(chr(667 - 619) + chr(111) + chr(89 - 40) + chr(1719 - 1667) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110110) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x32' + chr(1763 - 1708), 26812 - 26804), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + chr(49) + chr(577 - 523) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10340 - 10229) + '\061' + chr(53) + chr(718 - 666), 6373 - 6365), nzTpIcepk0o8('\x30' + '\x6f' + chr(61 - 12) + '\x31' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b10101 + 0o33) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(0b10 + 0o63) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b10111 + 0o32) + '\065' + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(6203 - 6092) + chr(0b110011) + chr(0b110111) + chr(0b11 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(6260 - 6149) + '\063' + '\x33' + chr(958 - 907), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(948 - 898) + chr(0b110110) + '\x37', 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1100101 + 0o12) + '\x37' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + '\x33' + chr(0b11 + 0o63) + chr(2482 - 2430), 0b1000), nzTpIcepk0o8('\060' + chr(5746 - 5635) + '\x32' + chr(0b110111) + chr(55), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1592 - 1539) + chr(0b1011 + 0o45), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'!'), '\144' + '\145' + chr(99) + chr(6907 - 6796) + chr(100) + '\145')(chr(0b1110101) + chr(0b101101 + 0o107) + '\146' + chr(1371 - 1326) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def VPFdGgYQBEx5(hXMPsSrOQzbh): try: qiE6ZboUDe50 = (yield hXMPsSrOQzbh.qiE6ZboUDe50()) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'Av\x1b\xed\xe2:TP\xd5MSn\xa4\xf4'), chr(0b1100100) + chr(101) + '\143' + '\x6f' + chr(0b1100100) + '\x65')(chr(117) + chr(0b1000110 + 0o56) + chr(0b1100110) + chr(45) + chr(0b111000))): raise VZ6Y0RH3JWlc() roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'hXd\xc5\xbe;x\x0e\xe1NxQ'), chr(0b10001 + 0o123) + '\145' + chr(99) + chr(0b100011 + 0o114) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'Lk8\xfe\xf3:s\x18\xf5nl[\xe8\xe4\x10\x8d\xd9X\xf0\xa7\x8f\x16\tV\x85\x02'), chr(100) + '\145' + chr(9549 - 9450) + '\x6f' + chr(0b11101 + 0o107) + '\145')(chr(0b1110101 + 0o0) + '\164' + chr(102) + chr(0b10010 + 0o33) + chr(0b100100 + 0o24)), roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'lq<\xf1\xe9:{g\xdaVPi\xad\xf5'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + '\x64' + chr(5765 - 5664))(chr(0b1110101) + chr(0b1000101 + 0o57) + chr(0b1 + 0o145) + chr(198 - 153) + chr(2502 - 2446)))) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'Pz2\xf1\xe16eU\xc7'), '\144' + chr(0b1100101) + chr(8781 - 8682) + chr(111) + chr(1156 - 1056) + '\145')('\x75' + chr(1696 - 1580) + '\146' + '\x2d' + '\070')): yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'lv3\xf9\xee-zg\xd0FQb\xbe\xe2\n\x95'), '\144' + chr(0b1000011 + 0o42) + chr(0b1100011) + chr(1751 - 1640) + '\144' + chr(101))(chr(117) + chr(0b1000000 + 0o64) + chr(0b101010 + 0o74) + chr(0b10 + 0o53) + chr(0b1111 + 0o51)))() roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'}|)\xea\xf51AY\xd8VX'), chr(0b1100100) + chr(6880 - 6779) + '\x63' + '\x6f' + chr(2650 - 2550) + '\x65')(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(0b110101 + 0o3)))(qiE6ZboUDe50)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2.connectionReady
def connectionReady(self, res=None): """ Callback invoked when the AMQP connection is ready (when self.ready fires). This API is not meant for users. Args: res: This is an unused argument that provides compatibility with Pika versions lower than 1.0.0. """ self._channel = yield self._allocate_channel() if _pika_version < pkg_resources.parse_version("1.0.0b1"): extra_args = dict(all_channels=True) else: extra_args = dict(global_qos=True) yield self._channel.basic_qos( prefetch_count=config.conf["qos"]["prefetch_count"], prefetch_size=config.conf["qos"]["prefetch_size"], **extra_args ) if _pika_version < pkg_resources.parse_version("1.0.0b1"): TwistedProtocolConnection.connectionReady(self, res)
python
def connectionReady(self, res=None): """ Callback invoked when the AMQP connection is ready (when self.ready fires). This API is not meant for users. Args: res: This is an unused argument that provides compatibility with Pika versions lower than 1.0.0. """ self._channel = yield self._allocate_channel() if _pika_version < pkg_resources.parse_version("1.0.0b1"): extra_args = dict(all_channels=True) else: extra_args = dict(global_qos=True) yield self._channel.basic_qos( prefetch_count=config.conf["qos"]["prefetch_count"], prefetch_size=config.conf["qos"]["prefetch_size"], **extra_args ) if _pika_version < pkg_resources.parse_version("1.0.0b1"): TwistedProtocolConnection.connectionReady(self, res)
[ "def", "connectionReady", "(", "self", ",", "res", "=", "None", ")", ":", "self", ".", "_channel", "=", "yield", "self", ".", "_allocate_channel", "(", ")", "if", "_pika_version", "<", "pkg_resources", ".", "parse_version", "(", "\"1.0.0b1\"", ")", ":", "extra_args", "=", "dict", "(", "all_channels", "=", "True", ")", "else", ":", "extra_args", "=", "dict", "(", "global_qos", "=", "True", ")", "yield", "self", ".", "_channel", ".", "basic_qos", "(", "prefetch_count", "=", "config", ".", "conf", "[", "\"qos\"", "]", "[", "\"prefetch_count\"", "]", ",", "prefetch_size", "=", "config", ".", "conf", "[", "\"qos\"", "]", "[", "\"prefetch_size\"", "]", ",", "*", "*", "extra_args", ")", "if", "_pika_version", "<", "pkg_resources", ".", "parse_version", "(", "\"1.0.0b1\"", ")", ":", "TwistedProtocolConnection", ".", "connectionReady", "(", "self", ",", "res", ")" ]
Callback invoked when the AMQP connection is ready (when self.ready fires). This API is not meant for users. Args: res: This is an unused argument that provides compatibility with Pika versions lower than 1.0.0.
[ "Callback", "invoked", "when", "the", "AMQP", "connection", "is", "ready", "(", "when", "self", ".", "ready", "fires", ")", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L148-L169
train
A callback invoked when the AMQP connection is ready.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPF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Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(961 - 913) + chr(111) + '\x32' + chr(0b111 + 0o57) + chr(1616 - 1565), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\x33', 0b1000), nzTpIcepk0o8(chr(716 - 668) + chr(8119 - 8008) + chr(818 - 767) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(0b1100 + 0o53) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(10098 - 9987) + '\062' + chr(859 - 811) + chr(1534 - 1481), 8985 - 8977), nzTpIcepk0o8('\x30' + chr(10056 - 9945) + chr(0b110011) + chr(0b1110 + 0o46) + chr(51), 50652 - 50644), nzTpIcepk0o8(chr(48) + chr(0b1011001 + 0o26) + '\061' + chr(53) + chr(0b11111 + 0o27), 22584 - 22576), nzTpIcepk0o8('\060' + chr(674 - 563) + chr(49) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b111 + 0o56) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(73 - 22) + '\065', 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(53) + chr(0b11111 + 0o22), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + '\063' + '\x30' + chr(53), 29120 - 29112), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100111 + 0o14) + chr(1003 - 955) + chr(0b111 + 0o56), 8), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b100001 + 0o116) + chr(49) + chr(0b1 + 0o64) + chr(367 - 318), ord("\x08")), nzTpIcepk0o8(chr(1483 - 1435) + chr(2399 - 2288) + chr(0b110010) + '\x34' + chr(1499 - 1449), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(5388 - 5277) + '\x31' + chr(54) + chr(0b110101), 56703 - 56695), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\061' + chr(0b101010 + 0o12), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b10010 + 0o42) + chr(53), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(11926 - 11815) + '\x31' + chr(1674 - 1623) + chr(0b110010), 1831 - 1823), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(51) + chr(0b110011) + chr(1248 - 1193), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b110010) + chr(49), 59332 - 59324), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b101100 + 0o12) + chr(0b110000 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(54) + '\063', 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(2256 - 2207) + chr(51) + chr(149 - 94), 55752 - 55744), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2029 - 1979) + chr(0b11011 + 0o30) + chr(0b101100 + 0o7), 60310 - 60302), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(362 - 313) + '\x30' + '\067', 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(10083 - 9972) + chr(244 - 195) + '\x31' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(0b10101 + 0o34), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110110) + chr(1685 - 1634), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1111 + 0o43) + chr(830 - 778), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1563 - 1514) + chr(49) + chr(0b1011 + 0o53), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + chr(0b110001) + chr(0b110011) + chr(0b110110 + 0o0), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b1010 + 0o47) + '\x36', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\060' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1932 - 1884) + chr(0b1101111) + chr(0b110101) + chr(0b111 + 0o52), 8), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(1055 - 1003) + chr(1196 - 1145), 0o10), nzTpIcepk0o8(chr(1366 - 1318) + chr(0b100110 + 0o111) + chr(50) + chr(1765 - 1710) + chr(0b110011), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + chr(1264 - 1216), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b')'), chr(8593 - 8493) + '\145' + chr(8560 - 8461) + chr(0b11000 + 0o127) + chr(8016 - 7916) + chr(101))(chr(0b1110101) + chr(0b1110100) + '\146' + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GSMA2cD4J5wO(hXMPsSrOQzbh, _XdQFJpnzJor=None): hXMPsSrOQzbh.oO1rBQeetvBW = (yield hXMPsSrOQzbh._allocate_channel()) if epKj36j0Axl_ < roI3spqORKae(RlNRVik21BGV, roI3spqORKae(ES5oEprVxulp(b'w\xd2yn[\\\xf3\x86\x1czArG'), chr(6883 - 6783) + chr(9196 - 9095) + chr(0b1100011) + chr(7578 - 7467) + chr(100) + chr(101))(chr(117) + chr(0b1110100) + chr(0b1000110 + 0o40) + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'6\x9d;3\x0ea\xb4'), chr(0b10111 + 0o115) + '\x65' + '\x63' + chr(0b110101 + 0o72) + chr(8998 - 8898) + chr(6910 - 6809))('\165' + chr(8435 - 8319) + chr(0b1100110) + chr(0b101101) + chr(0b10111 + 0o41))): vsHxRdBONQp3 = znjnJWK64FDT(all_channels=nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1000 + 0o147) + '\061', 0b1000)) else: vsHxRdBONQp3 = znjnJWK64FDT(global_qos=nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001), 8)) yield roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'e\xd2xt]\\\xf4\x8c\x1d'), chr(0b111101 + 0o47) + chr(101) + chr(3430 - 3331) + chr(0b1010111 + 0o30) + chr(570 - 470) + chr(101))('\165' + chr(0b1110100) + chr(0b1100001 + 0o5) + '\x2d' + '\x38'))(prefetch_count=roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'f\xf6XN\x08D\xf2\x9b\x01S@\\'), '\144' + '\x65' + '\143' + '\x6f' + chr(0b1100100) + chr(0b1011010 + 0o13))('\x75' + '\x74' + chr(0b1100110) + chr(732 - 687) + chr(1389 - 1333)))[roI3spqORKae(ES5oEprVxulp(b'v\xdcx'), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1111 + 0o125) + '\x65')('\165' + chr(0b101011 + 0o111) + chr(9641 - 9539) + chr(45) + '\070')][roI3spqORKae(ES5oEprVxulp(b'w\xc1n{[w\xe6\x8b1jGhGp'), chr(0b1100100) + '\145' + chr(0b1000 + 0o133) + chr(11950 - 11839) + chr(100) + '\145')(chr(117) + '\x74' + chr(7550 - 7448) + '\x2d' + chr(2422 - 2366))], prefetch_size=roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'f\xf6XN\x08D\xf2\x9b\x01S@\\'), '\x64' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(3037 - 2921) + '\x66' + chr(1286 - 1241) + '\070'))[roI3spqORKae(ES5oEprVxulp(b'v\xdcx'), chr(100) + chr(8234 - 8133) + chr(5373 - 5274) + '\x6f' + chr(0b111110 + 0o46) + chr(0b100000 + 0o105))(chr(0b1110101) + chr(0b1101000 + 0o14) + '\146' + '\x2d' + chr(2658 - 2602))][roI3spqORKae(ES5oEprVxulp(b'w\xc1n{[w\xe6\x8b1zAgL'), chr(6304 - 6204) + chr(2729 - 2628) + '\143' + chr(9350 - 9239) + chr(100) + chr(0b1011 + 0o132))('\165' + '\x74' + chr(0b110000 + 0o66) + chr(0b101101) + chr(1671 - 1615))], **vsHxRdBONQp3) if epKj36j0Axl_ < roI3spqORKae(RlNRVik21BGV, roI3spqORKae(ES5oEprVxulp(b'w\xd2yn[\\\xf3\x86\x1czArG'), '\x64' + '\145' + '\143' + chr(0b1101111) + chr(9693 - 9593) + '\145')('\165' + '\x74' + chr(0b1010011 + 0o23) + chr(838 - 793) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'6\x9d;3\x0ea\xb4'), chr(0b1100100) + '\145' + '\x63' + chr(111) + chr(0b1100100) + chr(0b1011001 + 0o14))('\165' + chr(116) + chr(0b1001 + 0o135) + '\055' + chr(1420 - 1364))): roI3spqORKae(aEqkKtynMVr_, roI3spqORKae(ES5oEprVxulp(b'd\xdces[`\xf1\x8a\x01gzxH`\xbc'), '\x64' + chr(101) + chr(0b1100011) + chr(5065 - 4954) + '\144' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(1255 - 1210) + '\070'))(hXMPsSrOQzbh, _XdQFJpnzJor)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2._read
def _read(self, queue_object, consumer): """ The loop that reads from the message queue and calls the consumer callback wrapper. Serialized Processing --------------------- This loop processes messages serially. This is because a second ``queue_object.get()`` operation can only occur after the Deferred from ``self._on_message`` completes. Thus, we can be sure that callbacks never run concurrently in two different threads. This is done rather than saturating the Twisted thread pool as the documentation for callbacks (in fedmsg and here) has never indicated that they are not thread-safe. In the future we can add a flag for users who are confident in their ability to write thread-safe code. Gracefully Halting ------------------ This is a loop that only exits when the consumer._running variable is set to False. The call to cancel will set this to false, as will the call to :meth:`pauseProducing`. These calls will then wait for the Deferred from this function to call back in order to ensure the message finishes processing. The Deferred object only completes when this method returns, so we need to periodically check the status of consumer._running. That's why there's a short timeout on the call to ``queue_object.get``. queue_object (pika.adapters.twisted_connection.ClosableDeferredQueue): The AMQP queue the consumer is bound to. consumer (dict): A dictionary describing the consumer for the given queue_object. """ while consumer._running: try: deferred_get = queue_object.get() _add_timeout(deferred_get, 1) channel, delivery_frame, properties, body = yield deferred_get except (defer.TimeoutError, defer.CancelledError): continue _std_log.debug( "Message arrived with delivery tag %s for %r", delivery_frame.delivery_tag, consumer._tag, ) try: message = get_message(delivery_frame.routing_key, properties, body) message.queue = consumer.queue except ValidationError: _std_log.warning( "Message id %s did not pass validation; ignoring message", properties.message_id, ) yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) continue try: _std_log.info( "Consuming message from topic %s (message id %s)", message.topic, properties.message_id, ) yield threads.deferToThread(consumer.callback, message) except Nack: _std_log.warning( "Returning message id %s to the queue", properties.message_id ) yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=True ) except Drop: _std_log.warning( "Consumer requested message id %s be dropped", properties.message_id ) yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) except HaltConsumer as e: _std_log.info( "Consumer indicated it wishes consumption to halt, shutting down" ) if e.requeue: yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=True ) else: yield channel.basic_ack(delivery_tag=delivery_frame.delivery_tag) raise e except Exception as e: _std_log.exception( "Received unexpected exception from consumer %r", consumer ) yield channel.basic_nack(delivery_tag=0, multiple=True, requeue=True) raise e else: _std_log.info( "Successfully consumed message from topic %s (message id %s)", message.topic, properties.message_id, ) yield channel.basic_ack(delivery_tag=delivery_frame.delivery_tag)
python
def _read(self, queue_object, consumer): """ The loop that reads from the message queue and calls the consumer callback wrapper. Serialized Processing --------------------- This loop processes messages serially. This is because a second ``queue_object.get()`` operation can only occur after the Deferred from ``self._on_message`` completes. Thus, we can be sure that callbacks never run concurrently in two different threads. This is done rather than saturating the Twisted thread pool as the documentation for callbacks (in fedmsg and here) has never indicated that they are not thread-safe. In the future we can add a flag for users who are confident in their ability to write thread-safe code. Gracefully Halting ------------------ This is a loop that only exits when the consumer._running variable is set to False. The call to cancel will set this to false, as will the call to :meth:`pauseProducing`. These calls will then wait for the Deferred from this function to call back in order to ensure the message finishes processing. The Deferred object only completes when this method returns, so we need to periodically check the status of consumer._running. That's why there's a short timeout on the call to ``queue_object.get``. queue_object (pika.adapters.twisted_connection.ClosableDeferredQueue): The AMQP queue the consumer is bound to. consumer (dict): A dictionary describing the consumer for the given queue_object. """ while consumer._running: try: deferred_get = queue_object.get() _add_timeout(deferred_get, 1) channel, delivery_frame, properties, body = yield deferred_get except (defer.TimeoutError, defer.CancelledError): continue _std_log.debug( "Message arrived with delivery tag %s for %r", delivery_frame.delivery_tag, consumer._tag, ) try: message = get_message(delivery_frame.routing_key, properties, body) message.queue = consumer.queue except ValidationError: _std_log.warning( "Message id %s did not pass validation; ignoring message", properties.message_id, ) yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) continue try: _std_log.info( "Consuming message from topic %s (message id %s)", message.topic, properties.message_id, ) yield threads.deferToThread(consumer.callback, message) except Nack: _std_log.warning( "Returning message id %s to the queue", properties.message_id ) yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=True ) except Drop: _std_log.warning( "Consumer requested message id %s be dropped", properties.message_id ) yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) except HaltConsumer as e: _std_log.info( "Consumer indicated it wishes consumption to halt, shutting down" ) if e.requeue: yield channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=True ) else: yield channel.basic_ack(delivery_tag=delivery_frame.delivery_tag) raise e except Exception as e: _std_log.exception( "Received unexpected exception from consumer %r", consumer ) yield channel.basic_nack(delivery_tag=0, multiple=True, requeue=True) raise e else: _std_log.info( "Successfully consumed message from topic %s (message id %s)", message.topic, properties.message_id, ) yield channel.basic_ack(delivery_tag=delivery_frame.delivery_tag)
[ "def", "_read", "(", "self", ",", "queue_object", ",", "consumer", ")", ":", "while", "consumer", ".", "_running", ":", "try", ":", "deferred_get", "=", "queue_object", ".", "get", "(", ")", "_add_timeout", "(", "deferred_get", ",", "1", ")", "channel", ",", "delivery_frame", ",", "properties", ",", "body", "=", "yield", "deferred_get", "except", "(", "defer", ".", "TimeoutError", ",", "defer", ".", "CancelledError", ")", ":", "continue", "_std_log", ".", "debug", "(", "\"Message arrived with delivery tag %s for %r\"", ",", "delivery_frame", ".", "delivery_tag", ",", "consumer", ".", "_tag", ",", ")", "try", ":", "message", "=", "get_message", "(", "delivery_frame", ".", "routing_key", ",", "properties", ",", "body", ")", "message", ".", "queue", "=", "consumer", ".", "queue", "except", "ValidationError", ":", "_std_log", ".", "warning", "(", "\"Message id %s did not pass validation; ignoring message\"", ",", "properties", ".", "message_id", ",", ")", "yield", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "False", ")", "continue", "try", ":", "_std_log", ".", "info", "(", "\"Consuming message from topic %s (message id %s)\"", ",", "message", ".", "topic", ",", "properties", ".", "message_id", ",", ")", "yield", "threads", ".", "deferToThread", "(", "consumer", ".", "callback", ",", "message", ")", "except", "Nack", ":", "_std_log", ".", "warning", "(", "\"Returning message id %s to the queue\"", ",", "properties", ".", "message_id", ")", "yield", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "True", ")", "except", "Drop", ":", "_std_log", ".", "warning", "(", "\"Consumer requested message id %s be dropped\"", ",", "properties", ".", "message_id", ")", "yield", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "False", ")", "except", "HaltConsumer", "as", "e", ":", "_std_log", ".", "info", "(", "\"Consumer indicated it wishes consumption to halt, shutting down\"", ")", "if", "e", ".", "requeue", ":", "yield", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "True", ")", "else", ":", "yield", "channel", ".", "basic_ack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ")", "raise", "e", "except", "Exception", "as", "e", ":", "_std_log", ".", "exception", "(", "\"Received unexpected exception from consumer %r\"", ",", "consumer", ")", "yield", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "0", ",", "multiple", "=", "True", ",", "requeue", "=", "True", ")", "raise", "e", "else", ":", "_std_log", ".", "info", "(", "\"Successfully consumed message from topic %s (message id %s)\"", ",", "message", ".", "topic", ",", "properties", ".", "message_id", ",", ")", "yield", "channel", ".", "basic_ack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ")" ]
The loop that reads from the message queue and calls the consumer callback wrapper. Serialized Processing --------------------- This loop processes messages serially. This is because a second ``queue_object.get()`` operation can only occur after the Deferred from ``self._on_message`` completes. Thus, we can be sure that callbacks never run concurrently in two different threads. This is done rather than saturating the Twisted thread pool as the documentation for callbacks (in fedmsg and here) has never indicated that they are not thread-safe. In the future we can add a flag for users who are confident in their ability to write thread-safe code. Gracefully Halting ------------------ This is a loop that only exits when the consumer._running variable is set to False. The call to cancel will set this to false, as will the call to :meth:`pauseProducing`. These calls will then wait for the Deferred from this function to call back in order to ensure the message finishes processing. The Deferred object only completes when this method returns, so we need to periodically check the status of consumer._running. That's why there's a short timeout on the call to ``queue_object.get``. queue_object (pika.adapters.twisted_connection.ClosableDeferredQueue): The AMQP queue the consumer is bound to. consumer (dict): A dictionary describing the consumer for the given queue_object.
[ "The", "loop", "that", "reads", "from", "the", "message", "queue", "and", "calls", "the", "consumer", "callback", "wrapper", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L172-L277
train
A generator that yields messages from the given queue.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU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3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(0b110011) + chr(0b110000) + chr(1711 - 1660), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11000 + 0o34) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111 + 0o0) + chr(50) + chr(0b111 + 0o56), 33619 - 33611), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + '\062' + '\064' + chr(0b10 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b110001) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(330 - 282) + '\157' + chr(0b100010 + 0o21) + '\x34' + '\066', 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + '\063' + chr(0b11101 + 0o30), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(866 - 814) + '\064', 0o10), nzTpIcepk0o8('\x30' + chr(3850 - 3739) + chr(50) + chr(90 - 37) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\061' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2155 - 2044) + chr(0b10100 + 0o35) + chr(48) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(1533 - 1422) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(53) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b1011 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(2253 - 2205) + chr(0b111110 + 0o61) + chr(50) + chr(929 - 878) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + chr(0b110111) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(866 - 818) + chr(0b1001010 + 0o45) + chr(0b110111) + chr(0b110010), 26148 - 26140), nzTpIcepk0o8(chr(0b110000) + chr(3968 - 3857) + chr(0b101011 + 0o7) + chr(859 - 808) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(245 - 197) + chr(4147 - 4036) + chr(0b101110 + 0o3) + chr(48) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110110) + chr(0b11101 + 0o24), 58631 - 58623), nzTpIcepk0o8(chr(1055 - 1007) + chr(0b1100000 + 0o17) + chr(674 - 625) + chr(0b110010) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(2206 - 2155) + chr(2573 - 2519), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8349 - 8238) + chr(2036 - 1983) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\064' + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + '\061' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1010110 + 0o31) + chr(50) + chr(0b110110) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1110 + 0o45) + '\x32' + chr(0b110010), 29483 - 29475), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x35' + chr(0b101 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2229 - 2118) + chr(0b110001) + chr(57 - 9) + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + chr(51) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100 + 0o55) + chr(1873 - 1822) + chr(0b110101), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b101 + 0o56), 0o10), nzTpIcepk0o8(chr(1899 - 1851) + chr(111) + chr(520 - 471) + '\060' + chr(0b11100 + 0o27), 8), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b101011 + 0o104) + chr(2254 - 2204) + chr(0b101101 + 0o3) + chr(0b100010 + 0o17), 567 - 559), nzTpIcepk0o8('\060' + '\x6f' + '\x36' + '\066', 50782 - 50774), nzTpIcepk0o8(chr(899 - 851) + chr(111) + '\x33' + chr(50) + chr(0b1010 + 0o47), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b110001) + chr(210 - 162), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x33' + chr(1516 - 1468), 12493 - 12485), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110100) + chr(393 - 344), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(12316 - 12205) + chr(0b11111 + 0o22) + chr(52 - 3) + chr(53), 24231 - 24223)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(7196 - 7085) + chr(0b110101) + chr(0b10100 + 0o34), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xed'), chr(0b1100100) + '\145' + chr(0b10101 + 0o116) + chr(0b1010111 + 0o30) + '\144' + '\145')('\x75' + chr(0b110110 + 0o76) + chr(0b1000001 + 0o45) + chr(0b10 + 0o53) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def nah1yE9Swp1G(hXMPsSrOQzbh, vmFhzSM1J84b, Fz9tLfvnh2vf): while roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\x8ag!\xe49\xa4n\xd3\xda\xa7\x17b'), chr(0b110010 + 0o62) + '\145' + chr(0b11 + 0o140) + '\x6f' + '\x64' + chr(181 - 80))(chr(3804 - 3687) + chr(0b1110100) + '\146' + '\055' + '\070')): try: iqANa7bMpbqc = vmFhzSM1J84b.GUKetu4xaGsJ() v5TMCleKRusB(iqANa7bMpbqc, nzTpIcepk0o8(chr(1613 - 1565) + chr(0b1101111) + chr(0b110001), 8)) (qiE6ZboUDe50, MiCxR_ginZ7Z, UtZvTnutzMHg, ryRPGaxqs24n) = (yield iqANa7bMpbqc) except (roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\x97Hx\xc6f\x93)\xa1\xd8\xbc*s'), chr(0b1100100) + chr(0b100010 + 0o103) + chr(4830 - 4731) + chr(9803 - 9692) + chr(100) + chr(0b1100101))(chr(1942 - 1825) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b100101 + 0o23))), roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\x80@{\xc0l\x8a1\x81\xce\x8b7s\x04o'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101111) + chr(100) + chr(0b110001 + 0o64))(chr(0b1110101) + '\164' + chr(102) + chr(45) + chr(56)))): continue roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xa4`,\xf90\x822\xd2\xff\xa3\x00['), chr(100) + chr(2302 - 2201) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(10229 - 10113) + chr(9237 - 9135) + chr(1887 - 1842) + chr(1211 - 1155)))(roI3spqORKae(ES5oEprVxulp(b'\x8eDf\xd0h\x818\xc4\xcb\xbc7h\x1dx\xf9\x1cM\xf07\x99s\xfaN\xcbd\xc3\xb7\x1b:9)r$\xa1\x13\xa2\xa8\xbe\x0e?\xe3\x04g'), chr(0b1100100) + chr(0b1111 + 0o126) + chr(0b111000 + 0o53) + chr(111) + chr(6178 - 6078) + chr(101))(chr(0b100100 + 0o121) + chr(0b0 + 0o164) + chr(102) + chr(0b101101) + '\x38'), roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'\xaatD\x92z\xael\xd6\xc0\xf8#2'), chr(100) + chr(101) + chr(0b11 + 0o140) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(5570 - 5454) + chr(3846 - 3744) + '\055' + '\x38')), roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\x9cUt\xc4'), '\144' + chr(0b1100101) + chr(942 - 843) + '\157' + chr(0b111 + 0o135) + chr(0b10110 + 0o117))(chr(2095 - 1978) + chr(0b1110100) + chr(0b110 + 0o140) + chr(0b1111 + 0o36) + '\x38'))) try: FksNMH1w_ns6 = KB3qSwugcArA(MiCxR_ginZ7Z.routing_key, UtZvTnutzMHg, ryRPGaxqs24n) FksNMH1w_ns6.iRcFmb17G7aY = Fz9tLfvnh2vf.iRcFmb17G7aY except NvSA9vIojSzD: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xb4@g\xcd`\x88:'), chr(7670 - 7570) + '\x65' + '\143' + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(116) + '\x66' + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x8eDf\xd0h\x818\xc4\xc3\xaae$\x18=\xf9U^\xb9-\x9e\'\xbe[\xc6~\xc6\xf2\x1f"u4w"\xf5_\xbe\xe6\xe3A$\xa4Oz\xd1`\x88:\xc4\xc7\xab6r\nz\xf8'), chr(100) + chr(3050 - 2949) + chr(0b10101 + 0o116) + chr(0b111111 + 0o60) + '\144' + '\x65')(chr(117) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xaeDf\xd0h\x818\xbb\xc3\xaa'), chr(0b1100100) + chr(923 - 822) + chr(0b1100011) + chr(291 - 180) + chr(6951 - 6851) + '\x65')(chr(10309 - 10192) + '\x74' + '\146' + chr(0b101101) + '\x38'))) yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xa1@f\xcaj\xb93\x85\xc9\xa5'), chr(4329 - 4229) + chr(0b1100101 + 0o0) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b1100101))(chr(8990 - 8873) + '\x74' + '\146' + '\055' + chr(0b111000)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'\xaatD\x92z\xael\xd6\xc0\xf8#2'), chr(0b1100100) + chr(0b1000 + 0o135) + chr(0b1100011) + chr(1799 - 1688) + '\144' + '\145')(chr(0b111111 + 0o66) + chr(0b1011111 + 0o25) + '\x66' + chr(45) + '\x38')), requeue=nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + '\060', 0o10)) continue try: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xaaY[\xdb0\xaa*\xbb\x9b\xa97N'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(8838 - 8738) + chr(0b111101 + 0o50))(chr(0b1110101) + chr(0b1011100 + 0o30) + chr(0b1001100 + 0o32) + chr(0b101101) + chr(1142 - 1086)))(roI3spqORKae(ES5oEprVxulp(b'\x80N{\xd0|\x8b4\x8a\xcd\xee(d\x18n\xfc[_\xb9%\x83<\xf3\x0b\xd3b\xc5\xbb\nc<.3k\xecS\xa2\xfb\xb9\x06(\xe3Hq\x83,\x95t'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(0b111011 + 0o51) + chr(5564 - 5463))(chr(117) + '\x74' + '\146' + chr(1471 - 1426) + chr(2185 - 2129)), roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'\xa6Eq\xe7O\xa9\x18\xa2\xd3\xfc!I'), chr(0b1000100 + 0o40) + chr(0b1100101) + chr(0b11101 + 0o106) + chr(6916 - 6805) + chr(8841 - 8741) + '\145')(chr(117) + chr(0b1110100) + chr(3383 - 3281) + '\x2d' + chr(56))), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xaeDf\xd0h\x818\xbb\xc3\xaa'), '\x64' + chr(0b10011 + 0o122) + chr(0b110 + 0o135) + '\157' + chr(0b1100100) + chr(0b1001011 + 0o32))(chr(0b1001010 + 0o53) + chr(8382 - 8266) + chr(0b1100110) + '\055' + '\070'))) yield roI3spqORKae(to7TnYfrgkn_, roI3spqORKae(ES5oEprVxulp(b'\xa7Ds\xc6{\xb22\xb0\xc2\xbc `\x0f'), chr(0b1100100) + '\145' + chr(0b101011 + 0o70) + chr(0b1001 + 0o146) + chr(0b111111 + 0o45) + '\145')('\165' + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xa9f \xe8\\\xd2\x08\xb1\xed\xa0.4'), chr(100) + chr(5870 - 5769) + '\143' + '\x6f' + '\x64' + '\145')(chr(12470 - 12353) + '\x74' + chr(6090 - 5988) + chr(0b10001 + 0o34) + chr(112 - 56))), FksNMH1w_ns6) except RRYFQBQwTJsn: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xb4@g\xcd`\x88:'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + chr(6948 - 6848) + '\145')('\165' + chr(116) + chr(688 - 586) + '\x2d' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x91Da\xd6{\x884\x8a\xcd\xee(d\x18n\xfc[_\xb9*\x95s\xbbX\x87y\xda\xf2\x1d+|}b6\xe4C\xb4'), '\x64' + chr(0b1010111 + 0o16) + chr(3886 - 3787) + chr(0b110001 + 0o76) + '\144' + '\145')(chr(0b1011110 + 0o27) + chr(6000 - 5884) + '\146' + '\x2d' + '\x38'), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xaeDf\xd0h\x818\xbb\xc3\xaa'), chr(1542 - 1442) + chr(0b1100101) + '\143' + chr(0b1001 + 0o146) + chr(0b1100100) + '\145')(chr(117) + chr(0b101010 + 0o112) + '\x66' + '\x2d' + '\070'))) yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xa1@f\xcaj\xb93\x85\xc9\xa5'), chr(6742 - 6642) + chr(0b1100101) + chr(0b1100011 + 0o0) + '\157' + chr(100) + '\145')(chr(8158 - 8041) + chr(0b1110100) + chr(4575 - 4473) + chr(0b11 + 0o52) + '\x38'))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'\xaatD\x92z\xael\xd6\xc0\xf8#2'), chr(6093 - 5993) + '\145' + chr(99) + '\x6f' + '\144' + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101011 + 0o2) + '\070')), requeue=nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31', 8)) except RkldlnaoMWPV: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xb4@g\xcd`\x88:'), chr(0b101010 + 0o72) + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(10948 - 10831) + '\x74' + chr(0b10111 + 0o117) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b"\x80N{\xd0|\x8b8\x96\x8a\xbc p\x1ex\xeeH_\xfdc\x9c6\xedX\xc6j\xd0\xf2\x00'9x`c\xe3S\xf1\xec\xaa\x0e=\xb3Dq"), chr(6928 - 6828) + chr(0b1100000 + 0o5) + chr(9779 - 9680) + chr(0b1101111) + chr(0b1011100 + 0o10) + chr(0b1100101))(chr(0b1001 + 0o154) + chr(116) + chr(4274 - 4172) + chr(0b101101) + chr(0b1010 + 0o56)), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xaeDf\xd0h\x818\xbb\xc3\xaa'), chr(100) + chr(3851 - 3750) + chr(0b1100011) + '\157' + chr(0b100011 + 0o101) + chr(0b1111 + 0o126))('\165' + '\x74' + chr(0b1010111 + 0o17) + chr(45) + chr(0b11010 + 0o36)))) yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xa1@f\xcaj\xb93\x85\xc9\xa5'), '\144' + chr(101) + chr(0b10101 + 0o116) + chr(111) + chr(100) + chr(1211 - 1110))(chr(0b1000110 + 0o57) + chr(0b1110100) + '\146' + '\055' + '\x38'))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'\xaatD\x92z\xael\xd6\xc0\xf8#2'), chr(0b110000 + 0o64) + chr(101) + chr(3098 - 2999) + chr(856 - 745) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(10273 - 10171) + '\x2d' + chr(0b111000))), requeue=nzTpIcepk0o8(chr(0b110000) + chr(111) + '\060', 8)) except Mu3Zfzebdly9 as wgf0sgcu_xPL: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xaaY[\xdb0\xaa*\xbb\x9b\xa97N'), chr(0b101111 + 0o65) + chr(0b1010110 + 0o17) + '\143' + chr(111) + chr(100) + chr(101))(chr(117) + chr(116) + chr(0b1100110) + chr(760 - 715) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b"\x80N{\xd0|\x8b8\x96\x8a\xa7+e\x02~\xfcH_\xfdc\x98'\xbe\\\xce~\xdd\xb7\x1acz2}0\xf4[\xa1\xfc\xb1\x0e#\xe3Uz\x83a\x871\x90\x86\xee6i\x1ei\xe9UT\xfec\x95<\xe9E"), chr(100) + '\145' + '\x63' + chr(0b101000 + 0o107) + chr(0b1100100) + chr(101))(chr(4546 - 4429) + chr(116) + chr(102) + chr(0b101101) + '\x38')) if roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'\xb1Dd\xd6l\x938'), chr(0b111 + 0o135) + chr(0b1010000 + 0o25) + chr(0b111101 + 0o46) + chr(6064 - 5953) + '\x64' + chr(6487 - 6386))(chr(117) + chr(0b1000110 + 0o56) + '\x66' + '\x2d' + chr(0b111000))): yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xa1@f\xcaj\xb93\x85\xc9\xa5'), '\x64' + '\x65' + chr(0b111001 + 0o52) + chr(0b1101111) + chr(0b1100100) + chr(101))('\x75' + chr(5579 - 5463) + '\x66' + chr(45) + '\x38'))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'\xaatD\x92z\xael\xd6\xc0\xf8#2'), '\144' + '\145' + chr(0b101010 + 0o71) + chr(0b100111 + 0o110) + chr(2903 - 2803) + chr(0b1100101))(chr(117) + chr(116) + chr(0b1100110) + '\055' + chr(1337 - 1281))), requeue=nzTpIcepk0o8(chr(1220 - 1172) + chr(111) + '\x31', 8)) else: yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xa1@f\xcaj\xb9<\x87\xc1'), '\x64' + chr(101) + chr(0b1010000 + 0o23) + '\x6f' + '\144' + chr(0b1100101 + 0o0))(chr(0b1110101) + '\x74' + '\146' + chr(1568 - 1523) + chr(3048 - 2992)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'\xaatD\x92z\xael\xd6\xc0\xf8#2'), '\144' + '\145' + chr(2107 - 2008) + '\x6f' + '\x64' + chr(1629 - 1528))('\165' + chr(116) + chr(6488 - 6386) + '\x2d' + chr(56)))) raise wgf0sgcu_xPL except zfo2Sgkz3IVJ as wgf0sgcu_xPL: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xb1BY\xc2C\x84>\xae\xe7\xad\x0bw'), '\144' + chr(9290 - 9189) + '\x63' + chr(7744 - 7633) + '\x64' + chr(0b1001001 + 0o34))(chr(2758 - 2641) + chr(0b1101100 + 0o10) + chr(102) + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b"\x91Dv\xc6`\x908\x80\x8a\xbb+d\x13m\xf8_N\xfc'\xd16\xe6H\xc2}\xc1\xbb\x06-9;a,\xec\x16\xb2\xe7\xb6\x128\xaeDg\x83,\x94"), '\144' + chr(8173 - 8072) + chr(5343 - 5244) + '\x6f' + chr(5458 - 5358) + '\x65')(chr(117) + chr(116) + '\146' + chr(45) + chr(0b111000)), Fz9tLfvnh2vf) yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xa1@f\xcaj\xb93\x85\xc9\xa5'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(5650 - 5550) + '\x65')(chr(117) + '\164' + '\146' + '\055' + chr(0b101101 + 0o13)))(delivery_tag=nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(887 - 839), 8), multiple=nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001), 8), requeue=nzTpIcepk0o8(chr(0b110000) + chr(1761 - 1650) + chr(0b110001), 8)) raise wgf0sgcu_xPL else: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xaaY[\xdb0\xaa*\xbb\x9b\xa97N'), chr(100) + '\x65' + chr(99) + chr(111) + chr(0b1100100) + '\x65')('\165' + '\164' + chr(102) + chr(0b1001 + 0o44) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x90Tv\xc0l\x95.\x82\xdf\xa2)xK~\xf2RI\xec.\x947\xbeF\xc2~\xc6\xb3\x0e&9;a,\xec\x16\xa5\xe7\xa8\x08.\xe3\x04f\x83!\x8b8\x97\xd9\xaf"dKt\xf9\x1c\x1f\xeaj'), chr(0b1100100) + '\145' + '\x63' + '\x6f' + chr(7403 - 7303) + chr(101))(chr(117) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b11000 + 0o40)), roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'\xa6Eq\xe7O\xa9\x18\xa2\xd3\xfc!I'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + chr(0b1110100) + '\x66' + chr(783 - 738) + chr(593 - 537))), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xaeDf\xd0h\x818\xbb\xc3\xaa'), '\x64' + chr(101) + chr(99) + chr(111) + chr(0b1101 + 0o127) + '\x65')(chr(0b1110101) + '\x74' + '\x66' + chr(45) + chr(0b111000)))) yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xa1@f\xcaj\xb9<\x87\xc1'), chr(6002 - 5902) + chr(5595 - 5494) + chr(5341 - 5242) + '\157' + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b11110 + 0o126) + '\146' + '\055' + chr(0b110000 + 0o10)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'\xaatD\x92z\xael\xd6\xc0\xf8#2'), chr(0b111001 + 0o53) + chr(1126 - 1025) + '\x63' + chr(111) + chr(0b1001001 + 0o33) + chr(0b10011 + 0o122))('\165' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b111000))))
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2.publish
def publish(self, message, exchange): """ Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. PublishReturned: If the broker rejected the message. This can happen if there are resource limits that have been reached (full disk, for example) or if the message will be routed to 0 queues and the exchange is set to reject such messages. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges """ message.validate() try: yield self._channel.basic_publish( exchange=exchange, routing_key=message._encoded_routing_key, body=message._encoded_body, properties=message._properties, ) except (pika.exceptions.NackError, pika.exceptions.UnroutableError) as e: _std_log.error("Message was rejected by the broker (%s)", str(e)) raise PublishReturned(reason=e) except pika.exceptions.ChannelClosed: self._channel = yield self._allocate_channel() yield self.publish(message, exchange) except pika.exceptions.ConnectionClosed as e: raise ConnectionException(reason=e)
python
def publish(self, message, exchange): """ Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. PublishReturned: If the broker rejected the message. This can happen if there are resource limits that have been reached (full disk, for example) or if the message will be routed to 0 queues and the exchange is set to reject such messages. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges """ message.validate() try: yield self._channel.basic_publish( exchange=exchange, routing_key=message._encoded_routing_key, body=message._encoded_body, properties=message._properties, ) except (pika.exceptions.NackError, pika.exceptions.UnroutableError) as e: _std_log.error("Message was rejected by the broker (%s)", str(e)) raise PublishReturned(reason=e) except pika.exceptions.ChannelClosed: self._channel = yield self._allocate_channel() yield self.publish(message, exchange) except pika.exceptions.ConnectionClosed as e: raise ConnectionException(reason=e)
[ "def", "publish", "(", "self", ",", "message", ",", "exchange", ")", ":", "message", ".", "validate", "(", ")", "try", ":", "yield", "self", ".", "_channel", ".", "basic_publish", "(", "exchange", "=", "exchange", ",", "routing_key", "=", "message", ".", "_encoded_routing_key", ",", "body", "=", "message", ".", "_encoded_body", ",", "properties", "=", "message", ".", "_properties", ",", ")", "except", "(", "pika", ".", "exceptions", ".", "NackError", ",", "pika", ".", "exceptions", ".", "UnroutableError", ")", "as", "e", ":", "_std_log", ".", "error", "(", "\"Message was rejected by the broker (%s)\"", ",", "str", "(", "e", ")", ")", "raise", "PublishReturned", "(", "reason", "=", "e", ")", "except", "pika", ".", "exceptions", ".", "ChannelClosed", ":", "self", ".", "_channel", "=", "yield", "self", ".", "_allocate_channel", "(", ")", "yield", "self", ".", "publish", "(", "message", ",", "exchange", ")", "except", "pika", ".", "exceptions", ".", "ConnectionClosed", "as", "e", ":", "raise", "ConnectionException", "(", "reason", "=", "e", ")" ]
Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. PublishReturned: If the broker rejected the message. This can happen if there are resource limits that have been reached (full disk, for example) or if the message will be routed to 0 queues and the exchange is set to reject such messages. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges
[ "Publish", "a", ":", "class", ":", "fedora_messaging", ".", "message", ".", "Message", "to", "an", "exchange", "_", "on", "the", "message", "broker", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L280-L315
train
Publish a message to an AMQP exchange.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZx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,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b10011 + 0o134) + chr(51) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + '\x31' + '\x37' + '\x33', 64439 - 64431), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + '\063' + chr(0b1110 + 0o44), 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + chr(0b110011) + '\061' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2502 - 2447) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1364 - 1312) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(476 - 427) + '\x34', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b110001) + chr(0b101000 + 0o13), ord("\x08")), nzTpIcepk0o8('\x30' + chr(8954 - 8843) + '\x32' + chr(0b100 + 0o62) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b101010 + 0o7) + chr(0b100110 + 0o16), 8), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1010101 + 0o32) + chr(49) + chr(2265 - 2212) + chr(52), 61880 - 61872), nzTpIcepk0o8(chr(48) + chr(3583 - 3472) + chr(51) + chr(0b110011) + chr(415 - 364), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(50) + chr(50) + chr(0b11 + 0o62), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\x37' + '\x37', 0b1000), nzTpIcepk0o8(chr(1362 - 1314) + chr(111) + chr(55) + chr(0b11101 + 0o25), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b100101 + 0o14) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x34' + '\061', 25867 - 25859), nzTpIcepk0o8(chr(0b110000) + chr(7256 - 7145) + chr(0b101010 + 0o7) + chr(408 - 360) + chr(487 - 433), 16236 - 16228), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x32' + '\060', 0b1000), nzTpIcepk0o8(chr(1498 - 1450) + chr(9128 - 9017) + chr(49) + chr(866 - 816) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(8430 - 8319) + chr(1315 - 1264) + chr(983 - 934) + chr(0b110001), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b101011 + 0o10) + chr(0b10010 + 0o36) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(10212 - 10101) + '\063' + chr(866 - 815) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101011 + 0o7) + chr(0b110110) + chr(0b110001 + 0o6), 0b1000), nzTpIcepk0o8(chr(1953 - 1905) + chr(0b1011101 + 0o22) + chr(0b110011) + '\x35' + chr(2262 - 2207), 0o10), nzTpIcepk0o8(chr(332 - 284) + chr(0b1101111) + chr(0b101111 + 0o3) + '\x30' + chr(746 - 698), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(49) + '\x32' + chr(0b111 + 0o57), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + '\062' + '\067' + chr(2475 - 2424), 0b1000), nzTpIcepk0o8('\060' + chr(1285 - 1174) + chr(52) + chr(2139 - 2087), 45751 - 45743), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(1172 - 1123) + chr(607 - 557), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001011 + 0o44) + chr(2450 - 2399) + chr(1120 - 1071) + '\065', 46119 - 46111), nzTpIcepk0o8(chr(0b110000) + chr(5759 - 5648) + chr(1257 - 1206) + chr(49) + '\x34', 0o10), nzTpIcepk0o8(chr(2234 - 2186) + chr(0b1010111 + 0o30) + '\x31' + '\x35' + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(11348 - 11237) + chr(0b100 + 0o61) + '\062', 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(0b110011) + chr(50) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(51) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(1966 - 1916), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(752 - 701) + chr(0b110101) + chr(0b11011 + 0o32), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(11950 - 11839) + chr(0b101100 + 0o6) + '\x37', 44882 - 44874), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11001 + 0o32) + chr(49) + chr(492 - 443), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b100 + 0o153) + chr(0b110011 + 0o2) + chr(741 - 693), 43090 - 43082)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'5'), chr(100) + '\x65' + '\x63' + chr(5096 - 4985) + chr(1082 - 982) + '\145')('\165' + chr(0b1110100) + '\x66' + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZRkmNLRvN8fl(hXMPsSrOQzbh, FksNMH1w_ns6, bxTA8Iugm8rP): roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'\\Oj\xad[p\xef(\xf7\xca\r\x99'), chr(0b101001 + 0o73) + chr(0b101011 + 0o72) + chr(7010 - 6911) + chr(0b1101111) + chr(0b10001 + 0o123) + chr(0b1100101))(chr(0b1011100 + 0o31) + chr(116) + chr(102) + chr(0b101101 + 0o0) + chr(0b110110 + 0o2)))() try: yield roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'y\x1a)\xa0[|\xfc>\xd4\xe0\x05\xa8\xfd'), '\144' + chr(8670 - 8569) + chr(0b101101 + 0o66) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b100000 + 0o125) + chr(116) + chr(102) + chr(1944 - 1899) + chr(0b111000)))(exchange=bxTA8Iugm8rP, routing_key=roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'D\x1e4\xaaWG\xe9/\xe9\xfe\x03\xae\xe1\xd6T\xec~-5*'), chr(100) + '\x65' + chr(0b1011 + 0o130) + '\x6f' + '\x64' + chr(0b10000 + 0o125))('\165' + chr(8534 - 8418) + chr(3579 - 3477) + chr(0b100001 + 0o14) + '\x38')), body=roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'D\x1e4\xaaWG\xe9/\xe9\xee\x03\xbf\xec'), chr(0b100010 + 0o102) + chr(0b110001 + 0o64) + chr(99) + chr(0b1000010 + 0o55) + chr(0b111111 + 0o45) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38')), properties=roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'M\x0b\x1f\xae[K\xe4$\xe7\xc6\x02\x9a'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(0b1001001 + 0o33) + '\x65')('\x75' + '\x74' + chr(0b1100110) + '\055' + chr(56)))) except (roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'U\x1a9\xa2}Q\xfe$\xc4'), '\144' + '\145' + chr(4623 - 4524) + '\157' + chr(8374 - 8274) + '\x65')('\165' + chr(0b1101011 + 0o11) + chr(0b10001 + 0o125) + chr(45) + '\x38')), roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'N\x15(\xa6MW\xed)\xda\xe9)\xa9\xe7\xd0H'), '\144' + chr(101) + '\x63' + chr(3605 - 3494) + chr(0b1100100) + chr(1793 - 1692))(chr(0b1110100 + 0o1) + chr(1824 - 1708) + '\x66' + chr(0b1010 + 0o43) + '\070'))) as wgf0sgcu_xPL: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b"j\x12k\xbeQS\xdc\x1d\xc0\xc9'\xbf"), '\144' + chr(101) + '\x63' + chr(0b1101111) + chr(0b1001100 + 0o30) + chr(101))(chr(9397 - 9280) + chr(12839 - 12723) + '\x66' + chr(0b101101) + chr(1082 - 1026)))(roI3spqORKae(ES5oEprVxulp(b'V\x1e)\xbaYD\xe9k\xc1\xed\x1f\xfb\xe7\xdaP\xeeB257\xe9\xa5\xa3\x97\x9b\xe83\x9bF8\xa2\xa7\x0bX\xf3\xf5g\x9e>'), chr(6473 - 6373) + chr(0b111001 + 0o54) + chr(0b1100011) + chr(0b1001101 + 0o42) + chr(0b1100100) + chr(2289 - 2188))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\055' + chr(56)), N9zlRy29S1SS(wgf0sgcu_xPL)) raise p6YPSwnJiGvX(reason=wgf0sgcu_xPL) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'X\x13;\xa7VF\xe0\x08\xda\xe3\x1f\xbe\xf1'), chr(5111 - 5011) + chr(0b101110 + 0o67) + '\x63' + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b100110 + 0o100) + chr(875 - 830) + chr(0b111000))): hXMPsSrOQzbh.oO1rBQeetvBW = (yield hXMPsSrOQzbh._allocate_channel()) yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'A)1\xa4vo\xde=\xf8\xb4\n\xb7'), chr(0b1100100) + chr(0b11100 + 0o111) + chr(99) + '\157' + chr(100) + chr(0b101101 + 0o70))('\x75' + chr(0b1110100) + '\x66' + chr(0b10111 + 0o26) + '\070'))(FksNMH1w_ns6, bxTA8Iugm8rP) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'X\x144\xa7]@\xf8"\xd9\xe2/\xb7\xfa\xcc_\xef'), chr(0b100010 + 0o102) + chr(7445 - 7344) + chr(0b1100011) + chr(0b1101111) + chr(0b11 + 0o141) + chr(101))('\x75' + chr(0b1110100) + chr(102) + chr(0b10101 + 0o30) + chr(0b111000))) as wgf0sgcu_xPL: raise L6C259nNuLMI(reason=wgf0sgcu_xPL)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2.consume
def consume(self, callback, queue, previous_consumer=None): """ Register a message consumer that executes the provided callback when messages are received. The queue must exist prior to calling this method. If a consumer already exists for the given queue, the callback is simply updated and any new messages for that consumer use the new callback. Args: callback (callable): The callback to invoke when a message is received. queue (str): The name of the queue to consume from. previous_consumer (ConsumerV2): If this is the resumption of a prior consumer, you can provide the previous consumer so its result deferred can be re-used. Returns: Deferred: A Deferred that fires when the consumer is successfully registered with the message broker. The callback receives a :class:`.ConsumerV2` object that represents the AMQP consumer. The Deferred may error back with a :class:`PermissionException` if the user cannot read from the queue, a :class:`NoFreeChannels` if this connection has hit its channel limit, or a :class:`ConnectionException` if the connection dies before the consumer is successfully registered. NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. """ if queue in self._consumers: self._consumers[queue].callback = callback defer.returnValue(self._consumers[queue]) if previous_consumer is not None: consumer = previous_consumer else: consumer = ConsumerV2(queue=queue, callback=callback) consumer._protocol = self consumer._channel = yield self._allocate_channel() try: queue_object, _ = yield consumer._channel.basic_consume( queue=consumer.queue, consumer_tag=consumer._tag ) except pika.exceptions.ChannelClosed as exc: if exc.args[0] == 403: raise PermissionException( obj_type="queue", description=queue, reason=exc.args[1] ) else: raise ConnectionException(reason=exc) def on_cancel_callback(frame): """ Called when the consumer is canceled server-side. This can happen, for example, when the queue is deleted. To handle this, we do the necessary book-keeping to remove the consumer and then fire the errback on the consumer so the caller of :func:`fedora_messaging.api.consume` can decide what to do. Args: frame (pika.frame.Method): The cancel method from the server, unused here because we already know what consumer is being canceled. """ _std_log.error("%r was canceled by the AMQP broker!", consumer) # If client and server are racing to cancel it might already be gone which # is why both are marked as no cover. try: del self._consumers[consumer.queue] except KeyError: # pragma: no cover pass try: del self.factory._consumers[consumer.queue] except KeyError: # pragma: no cover pass consumer._running = False consumer.result.errback(fail=ConsumerCanceled()) try: consumer._channel.add_on_cancel_callback(on_cancel_callback) except AttributeError: pass # pika 1.0.0+ def read_loop_errback(failure): """ Handle errors coming out of the read loop. There are two basic categories of errors: ones where the ``consumer.result`` Deferred needs to be fired because the error is not recoverable, ones where we can recover from by letting the connection restart, and ones which are fatal for this consumer only (the queue was deleted by an administrator). Args: failure (twisted.python.failure.Failure): The exception raised by the read loop encapsulated in a Failure. """ exc = failure.value if failure.check(pika.exceptions.ConsumerCancelled): # Pika 1.0.0+ raises this exception. To support previous versions # we register a callback (called below) ourselves with the channel. on_cancel_callback(None) elif failure.check(pika.exceptions.ChannelClosed): if exc.args[0] == 403: # This is a mis-configuration, the consumer can register itself, # but it doesn't have permissions to read from the queue, # so no amount of restarting will help. e = PermissionException( obj_type="queue", description=queue, reason=failure.value.args[1], ) consumer.result.errback(Failure(e, PermissionException)) consumer.cancel() else: _std_log.exception( "Consumer halted (%r) unexpectedly; " "the connection should restart.", failure, ) elif failure.check(error.ConnectionDone, error.ConnectionLost): _std_log.warning( "The connection to the broker was lost (%r), consumer halted; " "the connection should restart and consuming will resume.", exc, ) elif failure.check(pika.exceptions.AMQPError): _std_log.exception( "An unexpected AMQP error occurred; the connection should " "restart, but please report this as a bug." ) else: consumer.result.errback(failure) consumer.cancel() consumer._read_loop = self._read(queue_object, consumer) consumer._read_loop.addErrback(read_loop_errback) self._consumers[queue] = consumer _std_log.info("Successfully registered AMQP consumer %r", consumer) defer.returnValue(consumer)
python
def consume(self, callback, queue, previous_consumer=None): """ Register a message consumer that executes the provided callback when messages are received. The queue must exist prior to calling this method. If a consumer already exists for the given queue, the callback is simply updated and any new messages for that consumer use the new callback. Args: callback (callable): The callback to invoke when a message is received. queue (str): The name of the queue to consume from. previous_consumer (ConsumerV2): If this is the resumption of a prior consumer, you can provide the previous consumer so its result deferred can be re-used. Returns: Deferred: A Deferred that fires when the consumer is successfully registered with the message broker. The callback receives a :class:`.ConsumerV2` object that represents the AMQP consumer. The Deferred may error back with a :class:`PermissionException` if the user cannot read from the queue, a :class:`NoFreeChannels` if this connection has hit its channel limit, or a :class:`ConnectionException` if the connection dies before the consumer is successfully registered. NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. """ if queue in self._consumers: self._consumers[queue].callback = callback defer.returnValue(self._consumers[queue]) if previous_consumer is not None: consumer = previous_consumer else: consumer = ConsumerV2(queue=queue, callback=callback) consumer._protocol = self consumer._channel = yield self._allocate_channel() try: queue_object, _ = yield consumer._channel.basic_consume( queue=consumer.queue, consumer_tag=consumer._tag ) except pika.exceptions.ChannelClosed as exc: if exc.args[0] == 403: raise PermissionException( obj_type="queue", description=queue, reason=exc.args[1] ) else: raise ConnectionException(reason=exc) def on_cancel_callback(frame): """ Called when the consumer is canceled server-side. This can happen, for example, when the queue is deleted. To handle this, we do the necessary book-keeping to remove the consumer and then fire the errback on the consumer so the caller of :func:`fedora_messaging.api.consume` can decide what to do. Args: frame (pika.frame.Method): The cancel method from the server, unused here because we already know what consumer is being canceled. """ _std_log.error("%r was canceled by the AMQP broker!", consumer) # If client and server are racing to cancel it might already be gone which # is why both are marked as no cover. try: del self._consumers[consumer.queue] except KeyError: # pragma: no cover pass try: del self.factory._consumers[consumer.queue] except KeyError: # pragma: no cover pass consumer._running = False consumer.result.errback(fail=ConsumerCanceled()) try: consumer._channel.add_on_cancel_callback(on_cancel_callback) except AttributeError: pass # pika 1.0.0+ def read_loop_errback(failure): """ Handle errors coming out of the read loop. There are two basic categories of errors: ones where the ``consumer.result`` Deferred needs to be fired because the error is not recoverable, ones where we can recover from by letting the connection restart, and ones which are fatal for this consumer only (the queue was deleted by an administrator). Args: failure (twisted.python.failure.Failure): The exception raised by the read loop encapsulated in a Failure. """ exc = failure.value if failure.check(pika.exceptions.ConsumerCancelled): # Pika 1.0.0+ raises this exception. To support previous versions # we register a callback (called below) ourselves with the channel. on_cancel_callback(None) elif failure.check(pika.exceptions.ChannelClosed): if exc.args[0] == 403: # This is a mis-configuration, the consumer can register itself, # but it doesn't have permissions to read from the queue, # so no amount of restarting will help. e = PermissionException( obj_type="queue", description=queue, reason=failure.value.args[1], ) consumer.result.errback(Failure(e, PermissionException)) consumer.cancel() else: _std_log.exception( "Consumer halted (%r) unexpectedly; " "the connection should restart.", failure, ) elif failure.check(error.ConnectionDone, error.ConnectionLost): _std_log.warning( "The connection to the broker was lost (%r), consumer halted; " "the connection should restart and consuming will resume.", exc, ) elif failure.check(pika.exceptions.AMQPError): _std_log.exception( "An unexpected AMQP error occurred; the connection should " "restart, but please report this as a bug." ) else: consumer.result.errback(failure) consumer.cancel() consumer._read_loop = self._read(queue_object, consumer) consumer._read_loop.addErrback(read_loop_errback) self._consumers[queue] = consumer _std_log.info("Successfully registered AMQP consumer %r", consumer) defer.returnValue(consumer)
[ "def", "consume", "(", "self", ",", "callback", ",", "queue", ",", "previous_consumer", "=", "None", ")", ":", "if", "queue", "in", "self", ".", "_consumers", ":", "self", ".", "_consumers", "[", "queue", "]", ".", "callback", "=", "callback", "defer", ".", "returnValue", "(", "self", ".", "_consumers", "[", "queue", "]", ")", "if", "previous_consumer", "is", "not", "None", ":", "consumer", "=", "previous_consumer", "else", ":", "consumer", "=", "ConsumerV2", "(", "queue", "=", "queue", ",", "callback", "=", "callback", ")", "consumer", ".", "_protocol", "=", "self", "consumer", ".", "_channel", "=", "yield", "self", ".", "_allocate_channel", "(", ")", "try", ":", "queue_object", ",", "_", "=", "yield", "consumer", ".", "_channel", ".", "basic_consume", "(", "queue", "=", "consumer", ".", "queue", ",", "consumer_tag", "=", "consumer", ".", "_tag", ")", "except", "pika", ".", "exceptions", ".", "ChannelClosed", "as", "exc", ":", "if", "exc", ".", "args", "[", "0", "]", "==", "403", ":", "raise", "PermissionException", "(", "obj_type", "=", "\"queue\"", ",", "description", "=", "queue", ",", "reason", "=", "exc", ".", "args", "[", "1", "]", ")", "else", ":", "raise", "ConnectionException", "(", "reason", "=", "exc", ")", "def", "on_cancel_callback", "(", "frame", ")", ":", "\"\"\"\n Called when the consumer is canceled server-side.\n\n This can happen, for example, when the queue is deleted.\n To handle this, we do the necessary book-keeping to remove the consumer\n and then fire the errback on the consumer so the caller of\n :func:`fedora_messaging.api.consume` can decide what to do.\n\n Args:\n frame (pika.frame.Method): The cancel method from the server,\n unused here because we already know what consumer is being\n canceled.\n \"\"\"", "_std_log", ".", "error", "(", "\"%r was canceled by the AMQP broker!\"", ",", "consumer", ")", "# If client and server are racing to cancel it might already be gone which", "# is why both are marked as no cover.", "try", ":", "del", "self", ".", "_consumers", "[", "consumer", ".", "queue", "]", "except", "KeyError", ":", "# pragma: no cover", "pass", "try", ":", "del", "self", ".", "factory", ".", "_consumers", "[", "consumer", ".", "queue", "]", "except", "KeyError", ":", "# pragma: no cover", "pass", "consumer", ".", "_running", "=", "False", "consumer", ".", "result", ".", "errback", "(", "fail", "=", "ConsumerCanceled", "(", ")", ")", "try", ":", "consumer", ".", "_channel", ".", "add_on_cancel_callback", "(", "on_cancel_callback", ")", "except", "AttributeError", ":", "pass", "# pika 1.0.0+", "def", "read_loop_errback", "(", "failure", ")", ":", "\"\"\"\n Handle errors coming out of the read loop.\n\n There are two basic categories of errors: ones where the ``consumer.result``\n Deferred needs to be fired because the error is not recoverable, ones\n where we can recover from by letting the connection restart, and ones\n which are fatal for this consumer only (the queue was deleted by an\n administrator).\n\n Args:\n failure (twisted.python.failure.Failure): The exception raised by\n the read loop encapsulated in a Failure.\n \"\"\"", "exc", "=", "failure", ".", "value", "if", "failure", ".", "check", "(", "pika", ".", "exceptions", ".", "ConsumerCancelled", ")", ":", "# Pika 1.0.0+ raises this exception. To support previous versions", "# we register a callback (called below) ourselves with the channel.", "on_cancel_callback", "(", "None", ")", "elif", "failure", ".", "check", "(", "pika", ".", "exceptions", ".", "ChannelClosed", ")", ":", "if", "exc", ".", "args", "[", "0", "]", "==", "403", ":", "# This is a mis-configuration, the consumer can register itself,", "# but it doesn't have permissions to read from the queue,", "# so no amount of restarting will help.", "e", "=", "PermissionException", "(", "obj_type", "=", "\"queue\"", ",", "description", "=", "queue", ",", "reason", "=", "failure", ".", "value", ".", "args", "[", "1", "]", ",", ")", "consumer", ".", "result", ".", "errback", "(", "Failure", "(", "e", ",", "PermissionException", ")", ")", "consumer", ".", "cancel", "(", ")", "else", ":", "_std_log", ".", "exception", "(", "\"Consumer halted (%r) unexpectedly; \"", "\"the connection should restart.\"", ",", "failure", ",", ")", "elif", "failure", ".", "check", "(", "error", ".", "ConnectionDone", ",", "error", ".", "ConnectionLost", ")", ":", "_std_log", ".", "warning", "(", "\"The connection to the broker was lost (%r), consumer halted; \"", "\"the connection should restart and consuming will resume.\"", ",", "exc", ",", ")", "elif", "failure", ".", "check", "(", "pika", ".", "exceptions", ".", "AMQPError", ")", ":", "_std_log", ".", "exception", "(", "\"An unexpected AMQP error occurred; the connection should \"", "\"restart, but please report this as a bug.\"", ")", "else", ":", "consumer", ".", "result", ".", "errback", "(", "failure", ")", "consumer", ".", "cancel", "(", ")", "consumer", ".", "_read_loop", "=", "self", ".", "_read", "(", "queue_object", ",", "consumer", ")", "consumer", ".", "_read_loop", ".", "addErrback", "(", "read_loop_errback", ")", "self", ".", "_consumers", "[", "queue", "]", "=", "consumer", "_std_log", ".", "info", "(", "\"Successfully registered AMQP consumer %r\"", ",", "consumer", ")", "defer", ".", "returnValue", "(", "consumer", ")" ]
Register a message consumer that executes the provided callback when messages are received. The queue must exist prior to calling this method. If a consumer already exists for the given queue, the callback is simply updated and any new messages for that consumer use the new callback. Args: callback (callable): The callback to invoke when a message is received. queue (str): The name of the queue to consume from. previous_consumer (ConsumerV2): If this is the resumption of a prior consumer, you can provide the previous consumer so its result deferred can be re-used. Returns: Deferred: A Deferred that fires when the consumer is successfully registered with the message broker. The callback receives a :class:`.ConsumerV2` object that represents the AMQP consumer. The Deferred may error back with a :class:`PermissionException` if the user cannot read from the queue, a :class:`NoFreeChannels` if this connection has hit its channel limit, or a :class:`ConnectionException` if the connection dies before the consumer is successfully registered. NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection.
[ "Register", "a", "message", "consumer", "that", "executes", "the", "provided", "callback", "when", "messages", "are", "received", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L318-L461
train
Register a message consumer that executes the provided callback when a message is received.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJR2ssk3y,gCu7Qd75URN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4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(1614 - 1564) + chr(0b111 + 0o54), 2169 - 2161), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b10 + 0o155) + chr(51) + chr(0b10011 + 0o37) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + '\x33' + chr(0b11101 + 0o31), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b101000 + 0o11), 0o10), nzTpIcepk0o8(chr(1563 - 1515) + '\x6f' + chr(51) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2379 - 2325) + chr(51), 0b1000), nzTpIcepk0o8(chr(1488 - 1440) + chr(0b1100001 + 0o16) + chr(0b110011) + chr(1530 - 1480) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(552 - 504) + chr(0b1101111) + '\x33' + chr(2314 - 2263) + chr(0b1111 + 0o46), 12634 - 12626), nzTpIcepk0o8('\060' + chr(4156 - 4045) + chr(50) + chr(197 - 143) + chr(0b101000 + 0o17), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\064' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(2036 - 1925) + '\x33' + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\067' + '\x37', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(985 - 935) + chr(942 - 888), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b100100 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(0b1110 + 0o43) + chr(971 - 917) + chr(55), 0b1000), nzTpIcepk0o8(chr(74 - 26) + '\x6f' + chr(453 - 403) + chr(0b10011 + 0o41) + chr(0b110010), 17787 - 17779), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2616 - 2563) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(51) + chr(1684 - 1634) + chr(1512 - 1463), 8), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + '\063' + chr(54) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2494 - 2444) + chr(1443 - 1392) + chr(0b110110), 55510 - 55502), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b1100 + 0o44) + chr(1608 - 1556), 0o10), nzTpIcepk0o8(chr(116 - 68) + chr(0b110100 + 0o73) + '\062' + '\060' + '\x37', 36132 - 36124), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110110) + chr(89 - 41), 1970 - 1962), nzTpIcepk0o8('\060' + chr(859 - 748) + '\061' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(55) + chr(0b10100 + 0o42), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(4767 - 4656) + chr(0b11101 + 0o31) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1100010 + 0o15) + '\x31' + chr(0b1110 + 0o43) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b10 + 0o61) + '\067' + '\x37', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b10011 + 0o35) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1100101 + 0o12) + '\x31' + chr(53) + chr(55), 0o10), nzTpIcepk0o8(chr(1265 - 1217) + chr(0b1101111) + chr(51) + chr(0b110110) + chr(0b110010), 54935 - 54927), nzTpIcepk0o8(chr(700 - 652) + chr(10430 - 10319) + chr(0b110001) + '\x37' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(366 - 318) + chr(0b110111 + 0o70) + chr(51) + '\x31' + chr(0b110001), 7160 - 7152), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + '\x33' + chr(0b110001) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + '\x33' + chr(1604 - 1556), 47529 - 47521), nzTpIcepk0o8(chr(1983 - 1935) + chr(652 - 541) + chr(961 - 912) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(538 - 490) + chr(0b1101010 + 0o5) + chr(767 - 718) + '\x34' + chr(1989 - 1934), 12595 - 12587), nzTpIcepk0o8('\x30' + chr(0b101110 + 0o101) + '\x32' + chr(0b101001 + 0o16) + chr(0b100111 + 0o12), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\067' + chr(153 - 104), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b100110 + 0o111) + '\x35' + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbd'), '\144' + chr(0b11110 + 0o107) + chr(0b1000111 + 0o34) + chr(2273 - 2162) + chr(4249 - 4149) + '\145')('\165' + chr(0b1110011 + 0o1) + '\x66' + chr(0b1101 + 0o40) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def X3OqjwXXClZ4(hXMPsSrOQzbh, jG5KU4UUGnk5, iRcFmb17G7aY, HlC6IO2GlSEJ=None): if iRcFmb17G7aY in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcc\xb1qgnF\xbc\xb8\xc5\x95'), chr(0b1100100) + '\x65' + '\143' + '\157' + chr(0b10000 + 0o124) + chr(5152 - 5051))('\x75' + '\x74' + '\146' + chr(1458 - 1413) + chr(0b100011 + 0o25))): hXMPsSrOQzbh._consumers[iRcFmb17G7aY].jG5KU4UUGnk5 = jG5KU4UUGnk5 roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\xe1\xb7j|o]\x87\xbc\xdb\x93|'), chr(0b1100100) + chr(6436 - 6335) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1000011 + 0o42))(chr(117) + chr(116) + chr(1153 - 1051) + chr(606 - 561) + chr(2102 - 2046)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfa\xa4-0rw\x93\xee\xcf\xd5t\x9c'), '\144' + chr(4697 - 4596) + '\143' + '\x6f' + chr(0b1001111 + 0o25) + '\145')(chr(0b1110101) + chr(0b1000000 + 0o64) + chr(0b1100110) + chr(0b101101) + chr(56)))[iRcFmb17G7aY]) if HlC6IO2GlSEJ is not None: Fz9tLfvnh2vf = HlC6IO2GlSEJ else: Fz9tLfvnh2vf = NG64PLv_6Cye(queue=iRcFmb17G7aY, callback=jG5KU4UUGnk5) Fz9tLfvnh2vf.Kn5Wc1j2wfcr = hXMPsSrOQzbh Fz9tLfvnh2vf.oO1rBQeetvBW = (yield hXMPsSrOQzbh._allocate_channel()) try: (vmFhzSM1J84b, zIqcgNgQ9U6F) = (yield Fz9tLfvnh2vf._channel.basic_consume(queue=Fz9tLfvnh2vf.iRcFmb17G7aY, consumer_tag=Fz9tLfvnh2vf._tag)) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xd0\xba\x7fgsV\xbd\x9e\xdb\x89j\x9a2'), '\144' + chr(101) + chr(0b1100011) + chr(0b11101 + 0o122) + chr(0b1100100) + chr(6987 - 6886))(chr(0b1110101) + chr(6681 - 6565) + '\146' + chr(0b10 + 0o53) + chr(397 - 341))) as UmlM4OyLHmCY: if roI3spqORKae(UmlM4OyLHmCY, roI3spqORKae(ES5oEprVxulp(b'\xf6\xb7sYDC\xe3\xab\xc3\xb2J\x8d'), chr(0b11001 + 0o113) + chr(320 - 219) + chr(0b1100011) + chr(111) + chr(100) + '\145')(chr(0b1011010 + 0o33) + '\164' + chr(102) + chr(0b101101) + chr(834 - 778)))[nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1010100 + 0o33) + chr(2086 - 2038), 37713 - 37705)] == nzTpIcepk0o8(chr(193 - 145) + '\x6f' + chr(0b110110) + chr(0b110010) + chr(0b100000 + 0o23), 0b1000): raise pGE1WP1e6W78(obj_type=roI3spqORKae(ES5oEprVxulp(b'\xe2\xa7{|x'), chr(100) + '\x65' + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(0b110010 + 0o103) + chr(2918 - 2802) + chr(5452 - 5350) + chr(1628 - 1583) + '\070'), description=iRcFmb17G7aY, reason=roI3spqORKae(UmlM4OyLHmCY, roI3spqORKae(ES5oEprVxulp(b'\xf6\xb7sYDC\xe3\xab\xc3\xb2J\x8d'), chr(4797 - 4697) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1011100 + 0o31) + chr(0b1101110 + 0o6) + chr(0b1100110) + '\x2d' + chr(0b111000)))[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1827 - 1778), 6713 - 6705)]) else: raise L6C259nNuLMI(reason=UmlM4OyLHmCY) def z_mttMoh4IRz(KZ4ew2qs1HTO): roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xe2\xbb/~tC\x81\x8b\xc1\xa3R\x9b'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(3045 - 2934) + chr(100) + chr(0b1100101))('\165' + chr(0b11000 + 0o134) + '\x66' + chr(0b1000 + 0o45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xb6\xa0>~|@\xf1\xbe\xd6\x88z\x9a:q\x13\x82L\xa82\x83\xf6\xa1\xa7\xf1@o`l\x9d\xf0\x00\x99\x1a\xbb\xee'), chr(9153 - 9053) + chr(101) + chr(6227 - 6128) + chr(0b101101 + 0o102) + chr(7583 - 7483) + '\x65')('\x75' + '\x74' + chr(0b1100110) + chr(675 - 630) + chr(56)), Fz9tLfvnh2vf) try: del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfa\xa4-0rw\x93\xee\xcf\xd5t\x9c'), '\x64' + '\145' + chr(99) + chr(0b11000 + 0o127) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b1001110 + 0o46) + chr(0b1100110) + chr(560 - 515) + '\x38'))[roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xfa\x80}OpQ\xe0\xea\xf0\xd1x\xa6'), chr(5584 - 5484) + chr(0b1100101) + '\x63' + chr(111) + chr(100) + chr(101))(chr(4225 - 4108) + '\164' + chr(102) + chr(45) + chr(0b111000)))] except knUxyjfq07F9: pass try: del roI3spqORKae(hXMPsSrOQzbh.factory, roI3spqORKae(ES5oEprVxulp(b'\xfa\xa4-0rw\x93\xee\xcf\xd5t\x9c'), chr(0b110001 + 0o63) + '\x65' + chr(0b1010001 + 0o22) + chr(0b1101111) + '\144' + '\145')('\165' + chr(0b1110100) + chr(2340 - 2238) + '\x2d' + chr(0b111000)))[roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xfa\x80}OpQ\xe0\xea\xf0\xd1x\xa6'), chr(0b1100100) + chr(101) + chr(0b110010 + 0o61) + chr(0b1101111) + '\144' + '\x65')(chr(5401 - 5284) + chr(116) + '\x66' + chr(45) + chr(56)))] except knUxyjfq07F9: pass Fz9tLfvnh2vf.IF4G0B37piRc = nzTpIcepk0o8('\x30' + chr(0b1000100 + 0o53) + '\x30', 8) roI3spqORKae(Fz9tLfvnh2vf.result, roI3spqORKae(ES5oEprVxulp(b'\xdb\xb1/1[\x03\x94\xed\xc7\xa1V\xbe'), chr(642 - 542) + chr(101) + '\143' + '\x6f' + '\x64' + chr(0b111001 + 0o54))(chr(0b111011 + 0o72) + chr(0b1010010 + 0o42) + '\x66' + chr(0b111 + 0o46) + chr(0b111000)))(fail=C_FxVHFHazky()) try: roI3spqORKae(Fz9tLfvnh2vf._channel, roI3spqORKae(ES5oEprVxulp(b'\xf2\xb6zVr]\x8e\xbe\xd6\x88z\x9a:K\x14\xc3B\xbdp\x96\xfd\xaf'), chr(9426 - 9326) + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070'))(z_mttMoh4IRz) except bIsJhlpYrrU2: pass def LO1Y_Uc5cAXK(DUbr_vQkcSNT): UmlM4OyLHmCY = DUbr_vQkcSNT.uV9iBiw0y_Mp if roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\xc7\xb3v^lz\xe0\x96\xc4\x8ck\xa5'), '\x64' + '\x65' + chr(0b1110 + 0o125) + chr(11024 - 10913) + '\144' + chr(101))(chr(0b100101 + 0o120) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(56)))(roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xd0\xbdpzh^\xb4\xaf\xf4\x87w\x9c3x\x1b\xc7J'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1100 + 0o143) + chr(3096 - 2996) + chr(690 - 589))('\165' + chr(0b1110100) + chr(0b1010000 + 0o26) + chr(45) + '\070'))): z_mttMoh4IRz(None) elif roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\xc7\xb3v^lz\xe0\x96\xc4\x8ck\xa5'), chr(0b1100100) + chr(613 - 512) + chr(0b1001101 + 0o26) + chr(4379 - 4268) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(1566 - 1464) + chr(45) + '\x38'))(roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xd0\xba\x7fgsV\xbd\x9e\xdb\x89j\x9a2'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(8886 - 8770) + '\x66' + chr(0b101101) + '\x38'))): if roI3spqORKae(UmlM4OyLHmCY, roI3spqORKae(ES5oEprVxulp(b'\xf6\xb7sYDC\xe3\xab\xc3\xb2J\x8d'), chr(0b11 + 0o141) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + '\x74' + chr(102) + chr(45) + '\x38'))[nzTpIcepk0o8(chr(351 - 303) + chr(0b1101111) + chr(0b110000), 8)] == nzTpIcepk0o8(chr(929 - 881) + chr(1257 - 1146) + '\x36' + chr(50) + chr(51), 8): wgf0sgcu_xPL = pGE1WP1e6W78(obj_type=roI3spqORKae(ES5oEprVxulp(b'\xe2\xa7{|x'), chr(0b1100011 + 0o1) + '\x65' + chr(99) + chr(0b101110 + 0o101) + chr(0b1100100) + '\145')(chr(0b1011011 + 0o32) + '\x74' + chr(0b1100110) + chr(0b10000 + 0o35) + '\x38'), description=iRcFmb17G7aY, reason=DUbr_vQkcSNT.value.eemPYp2vtTSr[nzTpIcepk0o8('\060' + '\157' + chr(49), 8)]) roI3spqORKae(Fz9tLfvnh2vf.result, roI3spqORKae(ES5oEprVxulp(b'\xdb\xb1/1[\x03\x94\xed\xc7\xa1V\xbe'), '\144' + chr(101) + chr(4360 - 4261) + chr(111) + '\144' + chr(101))(chr(117) + '\164' + chr(0b1100101 + 0o1) + chr(811 - 766) + chr(56)))(WqTcOGBMJIY7(wgf0sgcu_xPL, pGE1WP1e6W78)) roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xf0\xb3pjx_'), '\144' + chr(0b1100101) + chr(99) + '\157' + '\x64' + chr(0b1011101 + 0o10))(chr(117) + '\x74' + '\146' + chr(1199 - 1154) + chr(0b111000)))() else: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xe1\xb1RhWQ\xb2\x97\xfa\x85W\x89'), chr(0b1000011 + 0o41) + '\x65' + chr(0b1011000 + 0o13) + chr(0b1010100 + 0o33) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + '\055' + chr(0b1 + 0o67)))(roI3spqORKae(ES5oEprVxulp(b'\xd0\xbdpzh^\xb4\xaf\x97\x8ex\x93"q\x13\x82\x06\xf4`\xde\xbe\xb1\xe9\xd5uNU/\x8b\xe7\x0b\x9e\x06\xf2\xeflf\x02\x99Z\xfc\xbcpl~G\xb8\xb2\xd9\xc6j\x979a\x1b\xc6\x0e\xa3w\x84\xea\xa5\xf5\xc4#'), chr(0b1100100) + chr(5528 - 5427) + chr(99) + chr(10162 - 10051) + chr(0b1100100) + '\145')('\x75' + '\164' + '\x66' + chr(697 - 652) + '\x38'), DUbr_vQkcSNT) elif roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\xc7\xb3v^lz\xe0\x96\xc4\x8ck\xa5'), chr(0b110011 + 0o61) + '\x65' + chr(3937 - 3838) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1010000 + 0o44) + '\146' + chr(1480 - 1435) + '\x38'))(roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b'\xd0\xbdpgxP\xa5\xb4\xd8\x88]\x908q'), '\x64' + '\145' + chr(918 - 819) + '\x6f' + chr(0b10010 + 0o122) + chr(0b100110 + 0o77))('\x75' + '\164' + chr(9087 - 8985) + chr(0b1000 + 0o45) + chr(56))), roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b'\xd0\xbdpgxP\xa5\xb4\xd8\x88U\x90%`'), chr(100) + chr(101) + chr(99) + '\157' + '\144' + chr(0b100000 + 0o105))('\165' + '\164' + '\146' + chr(0b11101 + 0o20) + chr(2396 - 2340)))): roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xe4\xb3lgt]\xb6'), '\x64' + chr(0b1001110 + 0o27) + chr(99) + chr(0b1101111) + '\x64' + '\145')(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xc7\xba{)~\\\xbf\xb3\xd2\x85m\x969zW\xd6A\xf1f\x9f\xfb\xe4\xe5\xc2bUU>\xdf\xf5\x0e\x81_\xa5\xa0kzG\x91\x1c\xe1\xfb2)~\\\xbf\xae\xc2\x8b|\x8dv|\x16\xceZ\xb4v\xcc\xbe\xb0\xef\xd5-]_"\x91\xe7\x0c\x86\x16\xa6\xa18}\x0f\xd6L\xff\xb6>{x@\xa5\xbc\xc5\x929\x9e8pW\xc1A\xbfa\x82\xf3\xad\xe9\xd7-IY \x93\xa2\x1d\x97\x0c\xbc\xa2} '), chr(9413 - 9313) + '\145' + '\x63' + chr(2145 - 2034) + chr(0b1100100) + '\x65')(chr(0b1100110 + 0o17) + '\x74' + chr(0b1100110) + chr(45) + '\x38'), UmlM4OyLHmCY) elif roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\xc7\xb3v^lz\xe0\x96\xc4\x8ck\xa5'), chr(100) + '\145' + chr(0b1000010 + 0o41) + '\x6f' + chr(100) + chr(101))('\x75' + '\164' + '\146' + chr(0b100011 + 0o12) + '\070'))(roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xd2\x9fOYXA\xa3\xb2\xc5'), chr(0b1000111 + 0o35) + chr(101) + chr(5078 - 4979) + '\x6f' + '\144' + chr(6719 - 6618))(chr(0b1110100 + 0o1) + '\x74' + chr(102) + '\055' + chr(0b111000)))): roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xe1\xb1RhWQ\xb2\x97\xfa\x85W\x89'), '\x64' + '\145' + '\143' + chr(2672 - 2561) + '\x64' + '\145')(chr(0b111011 + 0o72) + '\164' + chr(6895 - 6793) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xd2\xbc>|sV\xa9\xad\xd2\x85m\x9a246\xef\x7f\x812\x92\xec\xb6\xe8\xc2-QS/\x8a\xf0\x1d\x97\x1b\xf2\xeflf\x02\x99Z\xfc\xbcpl~G\xb8\xb2\xd9\xc6j\x979a\x1b\xc6\x0e\xa3w\x84\xea\xa5\xf5\xc4!\x1eR9\x8b\xa2\x1f\x9e\x1a\xa8\xbc}.\x15\xdcI\xfc\xa0j)i[\xb8\xae\x97\x87j\xdf74\x15\xd7I\xff'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(8777 - 8677) + chr(101))(chr(117) + chr(11760 - 11644) + '\x66' + chr(0b10100 + 0o31) + chr(0b111000))) else: roI3spqORKae(Fz9tLfvnh2vf.result, roI3spqORKae(ES5oEprVxulp(b'\xdb\xb1/1[\x03\x94\xed\xc7\xa1V\xbe'), chr(100) + chr(101) + chr(8360 - 8261) + '\x6f' + chr(100) + '\x65')('\165' + chr(0b1110100) + chr(102) + '\055' + chr(0b111000)))(DUbr_vQkcSNT) roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xf0\xb3pjx_'), chr(100) + chr(7093 - 6992) + chr(8845 - 8746) + chr(0b1101111) + chr(3842 - 3742) + '\145')(chr(0b111111 + 0o66) + chr(0b1110100) + chr(102) + chr(0b10 + 0o53) + chr(56)))() Fz9tLfvnh2vf.xq9KKSqaJ8mq = hXMPsSrOQzbh.nah1yE9Swp1G(vmFhzSM1J84b, Fz9tLfvnh2vf) roI3spqORKae(Fz9tLfvnh2vf._read_loop, roI3spqORKae(ES5oEprVxulp(b'\xf2\xb6zLoA\xb3\xbc\xd4\x8d'), '\x64' + chr(8219 - 8118) + chr(99) + chr(111) + '\144' + chr(5247 - 5146))('\x75' + chr(5597 - 5481) + chr(2475 - 2373) + chr(45) + chr(56)))(LO1Y_Uc5cAXK) hXMPsSrOQzbh.iv39oDB3x3mc[iRcFmb17G7aY] = Fz9tLfvnh2vf roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xfa\xaaPq$\x7f\xa6\x82\x86\x81k\xb0'), chr(0b1100100) + chr(6739 - 6638) + chr(0b100101 + 0o76) + chr(0b1101111) + chr(2084 - 1984) + chr(0b111010 + 0o53))('\x75' + '\164' + '\146' + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xc0\xa7}jx@\xa2\xbb\xc2\x8au\x86vf\x12\xc5G\xa2f\x92\xec\xa1\xe3\x90Lsa\x1c\xdf\xe1\x00\x9c\x0c\xbc\xa2}|G\x9cK'), chr(100) + chr(2260 - 2159) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b1010001 + 0o43) + chr(0b1100110) + chr(45) + chr(56)), Fz9tLfvnh2vf) roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\xe1\xb7j|o]\x87\xbc\xdb\x93|'), chr(0b1100100) + chr(0b11010 + 0o113) + chr(0b1011 + 0o130) + '\157' + chr(100) + chr(0b1100101))(chr(13679 - 13562) + chr(9543 - 9427) + '\146' + chr(1610 - 1565) + chr(2844 - 2788)))(Fz9tLfvnh2vf)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2.declare_exchanges
def declare_exchanges(self, exchanges): """ Declare a number of exchanges at once. This simply wraps the :meth:`pika.channel.Channel.exchange_declare` method and deals with error handling and channel allocation. Args: exchanges (list of dict): A list of dictionaries, where each dictionary represents an exchange. Each dictionary can have the following keys: * exchange (str): The exchange's name * exchange_type (str): The type of the exchange ("direct", "topic", etc) * passive (bool): If true, this will just assert that the exchange exists, but won't create it if it doesn't. Defaults to the configuration value :ref:`conf-passive-declares` * durable (bool): Whether or not the exchange is durable * arguments (dict): Extra arguments for the exchange's creation. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If an exchange could not be declared. This can occur if the exchange already exists, but does its type does not match (e.g. it is declared as a "topic" exchange, but exists as a "direct" exchange). It can also occur if it does not exist, but the current user does not have permissions to create the object. """ channel = yield self._allocate_channel() try: for exchange in exchanges: args = exchange.copy() args.setdefault("passive", config.conf["passive_declares"]) try: yield channel.exchange_declare(**args) except pika.exceptions.ChannelClosed as e: raise BadDeclaration("exchange", args, e) finally: try: channel.close() except pika.exceptions.AMQPError: pass
python
def declare_exchanges(self, exchanges): """ Declare a number of exchanges at once. This simply wraps the :meth:`pika.channel.Channel.exchange_declare` method and deals with error handling and channel allocation. Args: exchanges (list of dict): A list of dictionaries, where each dictionary represents an exchange. Each dictionary can have the following keys: * exchange (str): The exchange's name * exchange_type (str): The type of the exchange ("direct", "topic", etc) * passive (bool): If true, this will just assert that the exchange exists, but won't create it if it doesn't. Defaults to the configuration value :ref:`conf-passive-declares` * durable (bool): Whether or not the exchange is durable * arguments (dict): Extra arguments for the exchange's creation. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If an exchange could not be declared. This can occur if the exchange already exists, but does its type does not match (e.g. it is declared as a "topic" exchange, but exists as a "direct" exchange). It can also occur if it does not exist, but the current user does not have permissions to create the object. """ channel = yield self._allocate_channel() try: for exchange in exchanges: args = exchange.copy() args.setdefault("passive", config.conf["passive_declares"]) try: yield channel.exchange_declare(**args) except pika.exceptions.ChannelClosed as e: raise BadDeclaration("exchange", args, e) finally: try: channel.close() except pika.exceptions.AMQPError: pass
[ "def", "declare_exchanges", "(", "self", ",", "exchanges", ")", ":", "channel", "=", "yield", "self", ".", "_allocate_channel", "(", ")", "try", ":", "for", "exchange", "in", "exchanges", ":", "args", "=", "exchange", ".", "copy", "(", ")", "args", ".", "setdefault", "(", "\"passive\"", ",", "config", ".", "conf", "[", "\"passive_declares\"", "]", ")", "try", ":", "yield", "channel", ".", "exchange_declare", "(", "*", "*", "args", ")", "except", "pika", ".", "exceptions", ".", "ChannelClosed", "as", "e", ":", "raise", "BadDeclaration", "(", "\"exchange\"", ",", "args", ",", "e", ")", "finally", ":", "try", ":", "channel", ".", "close", "(", ")", "except", "pika", ".", "exceptions", ".", "AMQPError", ":", "pass" ]
Declare a number of exchanges at once. This simply wraps the :meth:`pika.channel.Channel.exchange_declare` method and deals with error handling and channel allocation. Args: exchanges (list of dict): A list of dictionaries, where each dictionary represents an exchange. Each dictionary can have the following keys: * exchange (str): The exchange's name * exchange_type (str): The type of the exchange ("direct", "topic", etc) * passive (bool): If true, this will just assert that the exchange exists, but won't create it if it doesn't. Defaults to the configuration value :ref:`conf-passive-declares` * durable (bool): Whether or not the exchange is durable * arguments (dict): Extra arguments for the exchange's creation. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If an exchange could not be declared. This can occur if the exchange already exists, but does its type does not match (e.g. it is declared as a "topic" exchange, but exists as a "direct" exchange). It can also occur if it does not exist, but the current user does not have permissions to create the object.
[ "Declare", "a", "number", "of", "exchanges", "at", "once", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L464-L505
train
A method that declares a number of exchanges at once.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT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r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(3010 - 2955) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + '\x31' + chr(52) + chr(897 - 849), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2197 - 2142) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(50) + '\x31' + chr(319 - 264), 0o10), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + '\x33' + chr(2234 - 2186) + '\060', 36329 - 36321), nzTpIcepk0o8(chr(1806 - 1758) + chr(0b111100 + 0o63) + '\061' + chr(0b110110) + chr(0b10011 + 0o40), 0o10), nzTpIcepk0o8(chr(48) + chr(5142 - 5031) + chr(49) + '\x36' + '\062', 4407 - 4399), nzTpIcepk0o8('\x30' + chr(3930 - 3819) + '\x32' + chr(0b110011) + '\066', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1010 + 0o51) + '\061' + chr(53), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(51) + '\062' + chr(0b110111), 61023 - 61015), nzTpIcepk0o8(chr(0b110000) + chr(11938 - 11827) + '\062' + chr(51) + chr(54), 8), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + '\x32' + chr(0b10 + 0o64) + chr(55), 21426 - 21418), nzTpIcepk0o8(chr(0b110000) + chr(3486 - 3375) + chr(0b110011) + chr(0b10101 + 0o35) + chr(1830 - 1782), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100000 + 0o17) + chr(0b110010 + 0o0) + chr(48) + '\061', 13057 - 13049), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + '\x33', 38575 - 38567), nzTpIcepk0o8(chr(276 - 228) + '\157' + '\x33' + '\066' + chr(0b11101 + 0o24), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(54) + chr(907 - 852), 0o10), nzTpIcepk0o8('\060' + chr(2782 - 2671) + chr(51) + '\066' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(50) + chr(48) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(723 - 674) + chr(2434 - 2381) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\061' + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(48) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(359 - 310) + '\x33' + chr(49), 57370 - 57362), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b10110 + 0o131) + chr(0b110000 + 0o3) + chr(2292 - 2238) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(1741 - 1691) + chr(0b100100 + 0o21) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b101011 + 0o104) + chr(0b110001) + '\x34' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(804 - 753) + chr(52) + chr(49), 43921 - 43913), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + '\x32' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(112 - 63) + chr(55) + chr(48), 44843 - 44835), nzTpIcepk0o8(chr(184 - 136) + chr(111) + chr(1915 - 1862) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x37' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\063' + chr(0b11 + 0o56), 0b1000), nzTpIcepk0o8('\x30' + chr(8499 - 8388) + '\x32' + chr(0b10110 + 0o35) + chr(0b100001 + 0o26), 0o10), nzTpIcepk0o8('\x30' + chr(11425 - 11314) + chr(0b110001 + 0o0) + chr(2168 - 2117) + '\x30', 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(1473 - 1362) + '\064' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(2261 - 2213) + chr(0b1101000 + 0o7) + chr(51) + chr(2185 - 2135) + '\060', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110100) + chr(0b110001), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(52) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(51) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101101 + 0o6) + chr(53) + '\065', 40966 - 40958)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(53) + chr(0b1 + 0o57), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'U'), chr(0b1011000 + 0o14) + chr(0b1100101) + chr(99) + chr(4529 - 4418) + '\144' + chr(988 - 887))(chr(0b1110101) + '\x74' + '\x66' + chr(0b11010 + 0o23) + chr(2684 - 2628)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Ipgy4bIeY12C(hXMPsSrOQzbh, j58eSDqO56RL): qiE6ZboUDe50 = (yield hXMPsSrOQzbh._allocate_channel()) try: for bxTA8Iugm8rP in j58eSDqO56RL: eemPYp2vtTSr = bxTA8Iugm8rP.copy() roI3spqORKae(eemPYp2vtTSr, roI3spqORKae(ES5oEprVxulp(b'\x01\x05\n\xc5\x8d\x069\xa7\xbf\xb8\xc9\xe4'), '\144' + chr(0b1100101) + chr(1702 - 1603) + chr(0b1101111) + chr(6494 - 6394) + chr(0b1100101))(chr(0b1000 + 0o155) + chr(0b1110100) + '\146' + '\055' + chr(1239 - 1183)))(roI3spqORKae(ES5oEprVxulp(b'\x0b\x01I\xfc\xa9\x05\x17'), chr(0b1100100) + chr(0b1000 + 0o135) + chr(0b1100011) + chr(7855 - 7744) + chr(0b1110 + 0o126) + chr(3265 - 3164))('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(0b111000)), roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\x1a%i\xdc\xf64\x05\xe6\xa2\x8d\xf6\xf6'), chr(0b1100100) + '\145' + chr(0b1011110 + 0o5) + chr(0b1100011 + 0o14) + '\x64' + chr(5912 - 5811))('\165' + chr(0b1110100) + chr(5768 - 5666) + chr(0b11111 + 0o16) + chr(0b111000)))[roI3spqORKae(ES5oEprVxulp(b'\x0b\x01I\xfc\xa9\x05\x17\xc1\xa9\xb2\xfd\xdb\xb1\xf3n\x82'), chr(0b1100100) + chr(0b101110 + 0o67) + '\143' + chr(111) + chr(0b110011 + 0o61) + chr(6958 - 6857))('\165' + chr(116) + chr(102) + '\055' + chr(880 - 824))]) try: yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\x1e\x18Y\xe7\xa1\x1d\x15\xfb\x92\xb3\xfb\xd4\xbc\xe0y\x94'), chr(100) + chr(0b1100101) + chr(9026 - 8927) + '\157' + chr(0b1100100) + chr(0b10000 + 0o125))(chr(0b1110101) + chr(5497 - 5381) + chr(0b1010 + 0o134) + chr(190 - 145) + '\070'))(**eemPYp2vtTSr) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'8\x08[\xe1\xae\x16\x1e\xdd\xa1\xb8\xed\xd2\xb4'), chr(0b1100 + 0o130) + chr(0b1100101) + chr(99) + chr(0b1100011 + 0o14) + chr(0b1100100) + chr(101))(chr(0b1100110 + 0o17) + chr(10871 - 10755) + '\146' + '\x2d' + chr(56))) as wgf0sgcu_xPL: raise qjwm_4zpn7Kz(roI3spqORKae(ES5oEprVxulp(b'\x1e\x18Y\xe7\xa1\x1d\x15\xfb'), '\144' + chr(101) + chr(768 - 669) + chr(8851 - 8740) + chr(0b1100100) + '\x65')(chr(0b110110 + 0o77) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38'), eemPYp2vtTSr, wgf0sgcu_xPL) finally: try: roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'!\x05K\xb8\x83\x10\x14\xa7\x98\xb3\xa6\xdd'), chr(0b1100100) + chr(0b101011 + 0o72) + '\x63' + '\157' + chr(0b10010 + 0o122) + chr(0b10111 + 0o116))('\x75' + chr(116) + chr(102) + '\x2d' + chr(914 - 858)))() except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b':-k\xdf\x85\x01\x00\xf1\xbf'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(408 - 308) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(2837 - 2781))): pass
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2.declare_queues
def declare_queues(self, queues): """ Declare a list of queues. Args: queues (list of dict): A list of dictionaries, where each dictionary represents an exchange. Each dictionary can have the following keys: * queue (str): The name of the queue * passive (bool): If true, this will just assert that the queue exists, but won't create it if it doesn't. Defaults to the configuration value :ref:`conf-passive-declares` * durable (bool): Whether or not the queue is durable * exclusive (bool): Whether or not the queue is exclusive to this connection. * auto_delete (bool): Whether or not the queue should be automatically deleted once this connection ends. * arguments (dict): Additional arguments for the creation of the queue. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If a queue could not be declared. This can occur if the queue already exists, but does its type does not match (e.g. it is declared as a durable queue, but exists as a non-durable queue). It can also occur if it does not exist, but the current user does not have permissions to create the object. """ channel = yield self._allocate_channel() try: for queue in queues: args = queue.copy() args.setdefault("passive", config.conf["passive_declares"]) try: yield channel.queue_declare(**args) except pika.exceptions.ChannelClosed as e: raise BadDeclaration("queue", args, e) finally: try: channel.close() except pika.exceptions.AMQPError: pass
python
def declare_queues(self, queues): """ Declare a list of queues. Args: queues (list of dict): A list of dictionaries, where each dictionary represents an exchange. Each dictionary can have the following keys: * queue (str): The name of the queue * passive (bool): If true, this will just assert that the queue exists, but won't create it if it doesn't. Defaults to the configuration value :ref:`conf-passive-declares` * durable (bool): Whether or not the queue is durable * exclusive (bool): Whether or not the queue is exclusive to this connection. * auto_delete (bool): Whether or not the queue should be automatically deleted once this connection ends. * arguments (dict): Additional arguments for the creation of the queue. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If a queue could not be declared. This can occur if the queue already exists, but does its type does not match (e.g. it is declared as a durable queue, but exists as a non-durable queue). It can also occur if it does not exist, but the current user does not have permissions to create the object. """ channel = yield self._allocate_channel() try: for queue in queues: args = queue.copy() args.setdefault("passive", config.conf["passive_declares"]) try: yield channel.queue_declare(**args) except pika.exceptions.ChannelClosed as e: raise BadDeclaration("queue", args, e) finally: try: channel.close() except pika.exceptions.AMQPError: pass
[ "def", "declare_queues", "(", "self", ",", "queues", ")", ":", "channel", "=", "yield", "self", ".", "_allocate_channel", "(", ")", "try", ":", "for", "queue", "in", "queues", ":", "args", "=", "queue", ".", "copy", "(", ")", "args", ".", "setdefault", "(", "\"passive\"", ",", "config", ".", "conf", "[", "\"passive_declares\"", "]", ")", "try", ":", "yield", "channel", ".", "queue_declare", "(", "*", "*", "args", ")", "except", "pika", ".", "exceptions", ".", "ChannelClosed", "as", "e", ":", "raise", "BadDeclaration", "(", "\"queue\"", ",", "args", ",", "e", ")", "finally", ":", "try", ":", "channel", ".", "close", "(", ")", "except", "pika", ".", "exceptions", ".", "AMQPError", ":", "pass" ]
Declare a list of queues. Args: queues (list of dict): A list of dictionaries, where each dictionary represents an exchange. Each dictionary can have the following keys: * queue (str): The name of the queue * passive (bool): If true, this will just assert that the queue exists, but won't create it if it doesn't. Defaults to the configuration value :ref:`conf-passive-declares` * durable (bool): Whether or not the queue is durable * exclusive (bool): Whether or not the queue is exclusive to this connection. * auto_delete (bool): Whether or not the queue should be automatically deleted once this connection ends. * arguments (dict): Additional arguments for the creation of the queue. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If a queue could not be declared. This can occur if the queue already exists, but does its type does not match (e.g. it is declared as a durable queue, but exists as a non-durable queue). It can also occur if it does not exist, but the current user does not have permissions to create the object.
[ "Declare", "a", "list", "of", "queues", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L508-L548
train
Declare a list of queues.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2S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,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(1826 - 1777) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(821 - 770) + chr(0b110101) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + '\062' + chr(1909 - 1860) + chr(0b10110 + 0o32), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010100 + 0o33) + '\x32' + chr(0b110110) + chr(0b11011 + 0o25), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\x32' + chr(0b110010), 5820 - 5812), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110 + 0o54) + chr(52) + '\060', 49375 - 49367), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\x32' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1000 + 0o55) + chr(0b11011 + 0o30), 42926 - 42918), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b101001 + 0o12) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(683 - 632) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1987 - 1937) + chr(0b110111) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b10010 + 0o40) + chr(0b10101 + 0o33), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + '\062' + chr(0b110011 + 0o3) + chr(51), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + '\063' + chr(0b110011) + chr(2067 - 2019), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10001 + 0o42) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1335 - 1285) + '\061' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(0b110010) + '\067' + chr(0b100011 + 0o24), 0o10), nzTpIcepk0o8('\060' + chr(0b1 + 0o156) + '\x33' + chr(53) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(631 - 582), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11111 + 0o22) + '\x36' + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x35' + chr(0b10000 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\066' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1446 - 1397) + chr(49) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\x32' + chr(1319 - 1264), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1011011 + 0o24) + '\061' + '\x36' + chr(533 - 485), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101001 + 0o11) + chr(0b1000 + 0o57) + '\065', 5778 - 5770), nzTpIcepk0o8(chr(48) + chr(7454 - 7343) + chr(0b110011) + chr(0b101110 + 0o6) + chr(2893 - 2839), 18970 - 18962), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + '\x34' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1619 - 1568) + '\064' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(0b110100) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(1231 - 1180) + chr(352 - 301), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(200 - 151) + '\065' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101101 + 0o2) + chr(0b110001) + chr(0b10100 + 0o36) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(11619 - 11508) + '\063' + '\067' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(49) + chr(0b110001) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(1037 - 989) + chr(111) + '\061' + chr(0b0 + 0o63) + chr(0b110101), 34196 - 34188), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011 + 0o0) + chr(0b110001) + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + '\x32' + chr(52), 0o10), nzTpIcepk0o8(chr(1604 - 1556) + chr(0b1001001 + 0o46) + chr(1734 - 1683) + '\062' + '\x33', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1473 - 1425) + '\x6f' + '\065' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa3'), chr(0b1100100) + chr(0b1 + 0o144) + '\143' + chr(0b1101111) + chr(6347 - 6247) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + chr(45) + chr(0b1100 + 0o54)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def umXwASU0e2Tx(hXMPsSrOQzbh, NJajU877lUB0): qiE6ZboUDe50 = (yield hXMPsSrOQzbh._allocate_channel()) try: for iRcFmb17G7aY in NJajU877lUB0: eemPYp2vtTSr = iRcFmb17G7aY.copy() roI3spqORKae(eemPYp2vtTSr, roI3spqORKae(ES5oEprVxulp(b'\xf7\x8e\xb8\xfa\xdf\xd5\x18\x12-\xb6\xeb\xc3'), chr(8612 - 8512) + '\145' + chr(0b1100011) + '\x6f' + chr(5342 - 5242) + chr(0b1100101))('\165' + chr(0b110010 + 0o102) + chr(102) + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xfd\x8a\xfb\xc3\xfb\xd66'), chr(0b1011 + 0o131) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + chr(4828 - 4727))('\x75' + '\164' + chr(102) + '\x2d' + '\x38'), roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\xec\xae\xdb\xe3\xa4\xe7$S0\x83\xd4\xd1'), chr(7145 - 7045) + '\145' + chr(0b1100011) + '\157' + chr(0b10111 + 0o115) + chr(0b1100101))(chr(9580 - 9463) + '\164' + chr(1011 - 909) + chr(45) + chr(0b101100 + 0o14)))[roI3spqORKae(ES5oEprVxulp(b'\xfd\x8a\xfb\xc3\xfb\xd66t;\xbc\xdf\xfcZ\xc1\xbdm'), chr(100) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(8601 - 8500))('\165' + '\164' + chr(102) + chr(45) + chr(0b11000 + 0o40))]) try: yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xfc\x9e\xed\xc5\xf7\xff7N<\xb5\xdd\xe2^'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b101101 + 0o67) + chr(7978 - 7877))(chr(0b1011011 + 0o32) + chr(0b10000 + 0o144) + chr(7012 - 6910) + chr(0b100001 + 0o14) + chr(0b101101 + 0o13)))(**eemPYp2vtTSr) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xce\x83\xe9\xde\xfc\xc5?h3\xb6\xcf\xf5_'), chr(0b1100100) + chr(921 - 820) + chr(0b1100011) + chr(3566 - 3455) + chr(0b10 + 0o142) + chr(0b1100101))('\165' + chr(0b0 + 0o164) + '\x66' + '\055' + chr(56))) as wgf0sgcu_xPL: raise qjwm_4zpn7Kz(roI3spqORKae(ES5oEprVxulp(b'\xfc\x9e\xed\xc5\xf7'), chr(100) + '\x65' + chr(0b1100011) + '\157' + chr(8793 - 8693) + '\x65')(chr(6699 - 6582) + chr(3783 - 3667) + chr(102) + chr(0b101101) + chr(0b110100 + 0o4)), eemPYp2vtTSr, wgf0sgcu_xPL) finally: try: roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xd7\x8e\xf9\x87\xd1\xc35\x12\n\xbd\x84\xfa'), chr(7738 - 7638) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\x75' + '\164' + chr(0b111111 + 0o47) + chr(45) + chr(0b111000)))() except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xcc\xa6\xd9\xe0\xd7\xd2!D-'), chr(0b1100100) + chr(1536 - 1435) + '\143' + chr(5865 - 5754) + chr(3781 - 3681) + chr(101))(chr(0b1110101) + chr(116) + chr(9969 - 9867) + chr(0b101101) + '\x38')): pass
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2.bind_queues
def bind_queues(self, bindings): """ Declare a set of bindings between queues and exchanges. Args: bindings (list of dict): A list of binding definitions. Each dictionary must contain the "queue" key whose value is the name of the queue to create the binding on, as well as the "exchange" key whose value should be the name of the exchange to bind to. Additional acceptable keys are any keyword arguments accepted by :meth:`pika.channel.Channel.queue_bind`. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If a binding could not be declared. This can occur if the queue or exchange don't exist, or if they do, but the current user does not have permissions to create bindings. """ channel = yield self._allocate_channel() try: for binding in bindings: try: yield channel.queue_bind(**binding) except pika.exceptions.ChannelClosed as e: raise BadDeclaration("binding", binding, e) finally: try: channel.close() except pika.exceptions.AMQPError: pass
python
def bind_queues(self, bindings): """ Declare a set of bindings between queues and exchanges. Args: bindings (list of dict): A list of binding definitions. Each dictionary must contain the "queue" key whose value is the name of the queue to create the binding on, as well as the "exchange" key whose value should be the name of the exchange to bind to. Additional acceptable keys are any keyword arguments accepted by :meth:`pika.channel.Channel.queue_bind`. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If a binding could not be declared. This can occur if the queue or exchange don't exist, or if they do, but the current user does not have permissions to create bindings. """ channel = yield self._allocate_channel() try: for binding in bindings: try: yield channel.queue_bind(**binding) except pika.exceptions.ChannelClosed as e: raise BadDeclaration("binding", binding, e) finally: try: channel.close() except pika.exceptions.AMQPError: pass
[ "def", "bind_queues", "(", "self", ",", "bindings", ")", ":", "channel", "=", "yield", "self", ".", "_allocate_channel", "(", ")", "try", ":", "for", "binding", "in", "bindings", ":", "try", ":", "yield", "channel", ".", "queue_bind", "(", "*", "*", "binding", ")", "except", "pika", ".", "exceptions", ".", "ChannelClosed", "as", "e", ":", "raise", "BadDeclaration", "(", "\"binding\"", ",", "binding", ",", "e", ")", "finally", ":", "try", ":", "channel", ".", "close", "(", ")", "except", "pika", ".", "exceptions", ".", "AMQPError", ":", "pass" ]
Declare a set of bindings between queues and exchanges. Args: bindings (list of dict): A list of binding definitions. Each dictionary must contain the "queue" key whose value is the name of the queue to create the binding on, as well as the "exchange" key whose value should be the name of the exchange to bind to. Additional acceptable keys are any keyword arguments accepted by :meth:`pika.channel.Channel.queue_bind`. Raises: NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. BadDeclaration: If a binding could not be declared. This can occur if the queue or exchange don't exist, or if they do, but the current user does not have permissions to create bindings.
[ "Declare", "a", "set", "of", "bindings", "between", "queues", "and", "exchanges", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L551-L582
train
Declare a set of bindings between queues and exchanges.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,Nf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qw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1121 - 1070) + chr(509 - 458) + '\063', 21520 - 21512), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + '\x31' + chr(1748 - 1699) + '\063', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(718 - 669) + chr(2354 - 2300), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(695 - 644) + chr(0b10000 + 0o45), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100001 + 0o22) + chr(0b1111 + 0o43) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(0b110001) + chr(0b100000 + 0o24) + chr(581 - 531), 28369 - 28361), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101000 + 0o11) + chr(55) + '\x30', 21560 - 21552), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101010 + 0o7) + chr(1445 - 1396) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(6100 - 5989) + chr(50) + chr(0b1100 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11653 - 11542) + chr(0b110010) + chr(0b110100) + chr(2835 - 2781), ord("\x08")), nzTpIcepk0o8(chr(1395 - 1347) + '\157' + '\x32' + chr(49), 31040 - 31032), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110000) + chr(1719 - 1664), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(1119 - 1070) + chr(767 - 719) + chr(55), 8), nzTpIcepk0o8(chr(48) + chr(4594 - 4483) + '\067' + chr(0b10011 + 0o41), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(52) + '\x32', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(2480 - 2427) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1000000 + 0o57) + chr(50) + '\x31' + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110111) + '\061', 17167 - 17159), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\062' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(1157 - 1109) + chr(4946 - 4835) + '\x33' + '\061' + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(9026 - 8915) + chr(0b100101 + 0o15) + '\x33' + chr(1794 - 1746), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\065' + '\063', 8585 - 8577), nzTpIcepk0o8(chr(0b110000) + chr(447 - 336) + chr(479 - 430) + '\064' + chr(49), 4702 - 4694), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + '\061' + chr(0b10110 + 0o34) + chr(0b110100), 18624 - 18616), nzTpIcepk0o8('\x30' + chr(0b11001 + 0o126) + '\x31' + chr(1304 - 1252) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(50) + chr(0b110000) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3690 - 3579) + chr(50) + chr(50) + chr(55), 35919 - 35911), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(51) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9689 - 9578) + chr(51) + chr(48) + chr(0b100111 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(2992 - 2881) + chr(49) + chr(729 - 674) + chr(2152 - 2097), 0b1000), nzTpIcepk0o8(chr(353 - 305) + '\x6f' + '\x37' + chr(52), 8), nzTpIcepk0o8(chr(1490 - 1442) + chr(0b1101111) + chr(132 - 83) + chr(0b101100 + 0o13) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(307 - 259) + '\157' + chr(364 - 315) + chr(0b110000) + chr(0b10111 + 0o40), 8), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(54) + '\067', 0b1000), nzTpIcepk0o8(chr(183 - 135) + chr(923 - 812) + chr(0b110001) + chr(0b110100) + chr(2037 - 1987), 8), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(2484 - 2433) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10735 - 10624) + chr(139 - 88) + chr(0b10001 + 0o44) + chr(93 - 38), 0b1000), nzTpIcepk0o8(chr(1904 - 1856) + chr(0b1101111) + chr(0b110011) + chr(366 - 313), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001 + 0o2), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11101 + 0o25) + chr(1477 - 1425) + chr(0b1010 + 0o46), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(9024 - 8913) + chr(0b11110 + 0o27) + chr(1472 - 1424), 40791 - 40783)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf5'), '\x64' + chr(101) + '\x63' + '\x6f' + '\144' + chr(173 - 72))(chr(8162 - 8045) + '\164' + chr(102) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def C1JLKGtApEUx(hXMPsSrOQzbh, Eov4xKwUG62w): qiE6ZboUDe50 = (yield hXMPsSrOQzbh._allocate_channel()) try: for kUiv6IrAIyl1 in Eov4xKwUG62w: try: yield roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\xaa>+h\xb5=\x1a%}\xc2'), '\x64' + chr(527 - 426) + chr(0b110111 + 0o54) + chr(111) + chr(7850 - 7750) + '\x65')(chr(0b1110101) + chr(116) + chr(10357 - 10255) + chr(45) + '\x38'))(**kUiv6IrAIyl1) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\x98#/s\xbe\x07\x14\x0f\x7f\xc9b"#'), chr(0b1001100 + 0o30) + chr(6451 - 6350) + chr(0b1100001 + 0o2) + '\x6f' + chr(4219 - 4119) + '\145')(chr(0b1000111 + 0o56) + '\x74' + chr(102) + chr(0b101101) + '\070')) as wgf0sgcu_xPL: raise qjwm_4zpn7Kz(roI3spqORKae(ES5oEprVxulp(b'\xb9" y\xb9\x0c\x1f'), chr(0b10001 + 0o123) + chr(0b110011 + 0o62) + chr(0b1100011) + chr(0b1101111) + chr(0b10111 + 0o115) + chr(0b1100101))('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(2292 - 2236)), kUiv6IrAIyl1, wgf0sgcu_xPL) finally: try: roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'\x81.?*\x93\x01\x1euF\xc2)-'), chr(100) + chr(0b1100101) + chr(0b11000 + 0o113) + chr(0b1001000 + 0o47) + '\x64' + '\x65')(chr(12017 - 11900) + chr(116) + chr(2562 - 2460) + chr(0b101101) + chr(56)))() except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\x9a\x06\x1fM\x95\x10\n#a'), chr(8165 - 8065) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1011011 + 0o11) + '\145')(chr(117) + chr(0b1011111 + 0o25) + '\x66' + chr(1937 - 1892) + chr(56))): pass
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocolV2.halt
def halt(self): """ Signal to consumers they should stop after finishing any messages currently being processed, then close the connection. Returns: defer.Deferred: fired when all consumers have successfully stopped and the connection is closed. """ if self.is_closed: # We were asked to stop because the connection is already gone. # There's no graceful way to stop because we can't acknowledge # messages in the middle of being processed. _std_log.info("Disconnect requested, but AMQP connection already gone") self._channel = None return _std_log.info( "Waiting for %d consumer(s) to finish processing before halting", len(self._consumers), ) pending_cancels = [] for c in list(self._consumers.values()): pending_cancels.append(c.cancel()) yield defer.gatherResults(pending_cancels) _std_log.info("Finished canceling %d consumers", len(self._consumers)) try: yield self.close() except pika.exceptions.ConnectionWrongStateError: pass # Already closing, not a problem since that's what we want. self._consumers = {} self._channel = None
python
def halt(self): """ Signal to consumers they should stop after finishing any messages currently being processed, then close the connection. Returns: defer.Deferred: fired when all consumers have successfully stopped and the connection is closed. """ if self.is_closed: # We were asked to stop because the connection is already gone. # There's no graceful way to stop because we can't acknowledge # messages in the middle of being processed. _std_log.info("Disconnect requested, but AMQP connection already gone") self._channel = None return _std_log.info( "Waiting for %d consumer(s) to finish processing before halting", len(self._consumers), ) pending_cancels = [] for c in list(self._consumers.values()): pending_cancels.append(c.cancel()) yield defer.gatherResults(pending_cancels) _std_log.info("Finished canceling %d consumers", len(self._consumers)) try: yield self.close() except pika.exceptions.ConnectionWrongStateError: pass # Already closing, not a problem since that's what we want. self._consumers = {} self._channel = None
[ "def", "halt", "(", "self", ")", ":", "if", "self", ".", "is_closed", ":", "# We were asked to stop because the connection is already gone.", "# There's no graceful way to stop because we can't acknowledge", "# messages in the middle of being processed.", "_std_log", ".", "info", "(", "\"Disconnect requested, but AMQP connection already gone\"", ")", "self", ".", "_channel", "=", "None", "return", "_std_log", ".", "info", "(", "\"Waiting for %d consumer(s) to finish processing before halting\"", ",", "len", "(", "self", ".", "_consumers", ")", ",", ")", "pending_cancels", "=", "[", "]", "for", "c", "in", "list", "(", "self", ".", "_consumers", ".", "values", "(", ")", ")", ":", "pending_cancels", ".", "append", "(", "c", ".", "cancel", "(", ")", ")", "yield", "defer", ".", "gatherResults", "(", "pending_cancels", ")", "_std_log", ".", "info", "(", "\"Finished canceling %d consumers\"", ",", "len", "(", "self", ".", "_consumers", ")", ")", "try", ":", "yield", "self", ".", "close", "(", ")", "except", "pika", ".", "exceptions", ".", "ConnectionWrongStateError", ":", "pass", "# Already closing, not a problem since that's what we want.", "self", ".", "_consumers", "=", "{", "}", "self", ".", "_channel", "=", "None" ]
Signal to consumers they should stop after finishing any messages currently being processed, then close the connection. Returns: defer.Deferred: fired when all consumers have successfully stopped and the connection is closed.
[ "Signal", "to", "consumers", "they", "should", "stop", "after", "finishing", "any", "messages", "currently", "being", "processed", "then", "close", "the", "connection", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L585-L617
train
Signal to consumers they should stop after finishing any messages currently being processed then close the connection.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P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foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1129 - 1081) + '\157' + chr(0b110011) + chr(141 - 89) + chr(377 - 323), ord("\x08")), nzTpIcepk0o8(chr(980 - 932) + chr(7514 - 7403) + '\x31' + '\x34' + '\061', 45669 - 45661), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\x36' + chr(0b100001 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\060' + chr(499 - 448), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(1531 - 1483) + chr(0b11 + 0o55), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + '\x31' + chr(48), 24534 - 24526), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b110011) + '\x33' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110110) + chr(52), 0b1000), nzTpIcepk0o8(chr(1025 - 977) + chr(0b11101 + 0o122) + '\061' + '\x35' + '\062', 23178 - 23170), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110110) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(947 - 899) + chr(0b111001 + 0o66) + chr(0b10011 + 0o40) + chr(1404 - 1349) + chr(0b110100), 54405 - 54397), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(53) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + '\x32' + '\x30' + chr(997 - 948), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10 + 0o61) + '\x36' + chr(52), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(1573 - 1522) + chr(0b110001), 3279 - 3271), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b1101 + 0o52) + '\x33', 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\063' + '\067' + chr(0b110001), 62581 - 62573), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b110000) + chr(99 - 51), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b110011) + chr(0b110101) + '\x31', 23351 - 23343), nzTpIcepk0o8('\060' + '\157' + chr(2420 - 2369) + chr(425 - 370) + chr(598 - 546), 8), nzTpIcepk0o8('\x30' + '\157' + chr(2094 - 2040) + chr(0b111 + 0o60), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + chr(53) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(12001 - 11890) + chr(0b10111 + 0o33) + chr(1153 - 1098) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(328 - 279) + chr(1241 - 1193) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\x36' + chr(0b101010 + 0o11), 7530 - 7522), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(847 - 798) + chr(0b110111) + chr(2319 - 2264), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b1 + 0o63) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(8057 - 7946) + '\x31' + '\x31' + chr(55), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b101100 + 0o103) + chr(2052 - 2002) + chr(0b100010 + 0o20) + chr(1716 - 1665), 5021 - 5013), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(0b110000) + chr(48), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\064' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110110) + chr(492 - 440), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(49) + chr(0b11010 + 0o31), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110001) + '\x32', 54288 - 54280), nzTpIcepk0o8('\x30' + chr(0b101110 + 0o101) + '\x31' + '\067' + chr(0b110001), 40042 - 40034), nzTpIcepk0o8(chr(0b110000) + chr(0b101100 + 0o103) + chr(979 - 927) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(10556 - 10445) + chr(51) + chr(0b0 + 0o65) + chr(0b100101 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(529 - 481) + chr(111) + chr(264 - 214) + chr(0b110010) + chr(0b110111), 64899 - 64891), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(1401 - 1350) + chr(126 - 78), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(10121 - 10010) + chr(2180 - 2127) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc8'), chr(0b11000 + 0o114) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b11111 + 0o105) + '\x65')(chr(0b1110101) + chr(2179 - 2063) + chr(102) + chr(45) + chr(2573 - 2517)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def w6MbTAsVNMGy(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\x8f\x12\xe8 \xac'\xaf\x91\x0e"), chr(0b100 + 0o140) + chr(4500 - 4399) + '\143' + chr(9067 - 8956) + chr(100) + '\145')(chr(0b110001 + 0o104) + '\164' + chr(102) + '\x2d' + chr(56))): roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\x8f\x19\xf9;\xf9\x04\xab\xab[T\x8ed'), chr(4861 - 4761) + chr(0b1100101) + chr(6076 - 5977) + chr(111) + chr(2653 - 2553) + chr(5163 - 5062))(chr(7560 - 7443) + chr(4416 - 4300) + chr(0b1100110) + '\x2d' + chr(773 - 717)))(roI3spqORKae(ES5oEprVxulp(b'\xa2\x08\xc4 \xaf&\xb2\x91\tG\xdcY\xe4\x85\xac\xde\x8a\xf4\x8c\x98\x1b\rs\xca4\xd3>\xef\x1e\xc3`\x04\x1b\xa5$\x1cD\x9b\xfe\xb7\x88A\xd6/\xb2-\xbd\x90\x13\x13\x9bD\xef\x91'), chr(0b1100100) + chr(3093 - 2992) + '\143' + chr(12136 - 12025) + chr(0b101011 + 0o71) + '\x65')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + '\070')) hXMPsSrOQzbh.oO1rBQeetvBW = None return roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\x8f\x19\xf9;\xf9\x04\xab\xab[T\x8ed'), '\144' + chr(0b1100100 + 0o1) + chr(0b1100011) + chr(5419 - 5308) + '\144' + chr(8176 - 8075))('\x75' + chr(116) + chr(0b1010000 + 0o26) + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xb1\x00\xde7\xa9&\xbb\xd4\x0c\\\x8e\x0b\xa4\x90\xf9\xd8\x96\xee\x9a\x89ZHc\x973\xda_\xd6 \xb3&\x0e\x1a\xa29\x11\x07\x9f\xe5\xb7\x85\x04\xc40\xa9&\xbb\xd4\x08V\x9aD\xf3\x91\xf9\xd3\x98\xec\x9d\x95YJ'), '\x64' + '\x65' + chr(99) + chr(111) + chr(0b100010 + 0o102) + chr(101))(chr(0b1110101) + chr(0b100000 + 0o124) + chr(0b1100110) + chr(218 - 173) + '\070'), ftfygxgFas5X(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x8f\x17\x84z\xaf\x0c\x9e\xc7\x12\x00\x91H'), chr(0b1100100) + '\x65' + chr(0b10101 + 0o116) + '\157' + '\144' + chr(0b1010111 + 0o16))('\x75' + chr(13064 - 12948) + '\x66' + chr(45) + chr(506 - 450))))) xVW_lV1dDITU = [] for teUmM7cKWZUa in H4NoA26ON7iG(roI3spqORKae(hXMPsSrOQzbh._consumers, roI3spqORKae(ES5oEprVxulp(b"\xa5\x12\xd8'\x9a\x02\x94\xc2\x12\n\xa8S"), '\144' + '\x65' + '\143' + '\x6f' + chr(6312 - 6212) + chr(0b1100101))('\x75' + '\164' + chr(102) + chr(0b101100 + 0o1) + chr(636 - 580)))()): roI3spqORKae(xVW_lV1dDITU, roI3spqORKae(ES5oEprVxulp(b'\xae5\xe4w\xb8/\x9b\x9b\x00\\\xa9\x1e'), '\144' + '\145' + chr(0b1100011) + chr(392 - 281) + '\144' + chr(0b1100101))('\x75' + '\x74' + '\x66' + chr(0b101 + 0o50) + chr(0b111000)))(roI3spqORKae(teUmM7cKWZUa, roI3spqORKae(ES5oEprVxulp(b'\x85\x00\xd9 \xa5$'), '\144' + '\145' + chr(0b1100011) + chr(0b11000 + 0o127) + '\144' + '\x65')(chr(117) + '\164' + '\x66' + chr(215 - 170) + chr(1973 - 1917)))()) yield roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\x81\x00\xc3+\xa5:\x8e\x91\x19F\x90_\xf2'), '\x64' + '\145' + chr(99) + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(xVW_lV1dDITU) roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\x8f\x19\xf9;\xf9\x04\xab\xab[T\x8ed'), chr(0b1001010 + 0o32) + '\x65' + chr(0b1000000 + 0o43) + '\157' + chr(7061 - 6961) + chr(0b100111 + 0o76))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xa0\x08\xd9*\xb3 \xb9\x90JP\x9dE\xe2\x91\xb5\xd2\x97\xe7\xc9\xd9S\rr\xd0.\x80\n\xcf*\xe13'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1 + 0o156) + chr(6186 - 6086) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(0b1010 + 0o43) + chr(1318 - 1262)), ftfygxgFas5X(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x8f\x17\x84z\xaf\x0c\x9e\xc7\x12\x00\x91H'), chr(3183 - 3083) + '\145' + chr(0b101111 + 0o64) + chr(0b1010001 + 0o36) + chr(0b1000010 + 0o42) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(1241 - 1196) + '\070')))) try: yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbc\x04\xc6t\x83+\xba\xcd?W\xc4A'), chr(0b11101 + 0o107) + chr(0b1011001 + 0o14) + chr(0b1100011 + 0o0) + chr(0b110 + 0o151) + '\144' + chr(0b1100101))(chr(6051 - 5934) + chr(0b1100011 + 0o21) + chr(0b1101 + 0o131) + '\055' + '\070'))() except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xa5\x0e\xd9-\xa5+\xa8\x9d\x05]\xabY\xee\x9a\xbe\xe8\x8d\xe1\x9d\x99r_c\xd02'), '\144' + '\145' + chr(8790 - 8691) + chr(5488 - 5377) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b1100101 + 0o1) + chr(784 - 739) + chr(56))): pass hXMPsSrOQzbh.iv39oDB3x3mc = {} hXMPsSrOQzbh.oO1rBQeetvBW = None
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocol._read
def _read(self, queue_object, consumer): """ The loop that reads from the message queue and calls the consumer callback wrapper. queue_object (pika.adapters.twisted_connection.ClosableDeferredQueue): The AMQP queue the consumer is bound to. consumer (dict): A dictionary describing the consumer for the given queue_object. """ while self._running: try: _channel, delivery_frame, properties, body = yield queue_object.get() except (error.ConnectionDone, ChannelClosedByClient): # This is deliberate. _legacy_twisted_log.msg( "Stopping the AMQP consumer with tag {tag}", tag=consumer.tag ) break except pika.exceptions.ChannelClosed as e: _legacy_twisted_log.msg( "Stopping AMQP consumer {tag} for queue {q}: {e}", tag=consumer.tag, q=consumer.queue, e=str(e), logLevel=logging.ERROR, ) break except pika.exceptions.ConsumerCancelled as e: _legacy_twisted_log.msg( "The AMQP broker canceled consumer {tag} on queue {q}: {e}", tag=consumer.tag, q=consumer.queue, e=str(e), logLevel=logging.ERROR, ) break except Exception: _legacy_twisted_log.msg( "An unexpected error occurred consuming from queue {q}", q=consumer.queue, logLevel=logging.ERROR, ) break if body: yield self._on_message(delivery_frame, properties, body, consumer)
python
def _read(self, queue_object, consumer): """ The loop that reads from the message queue and calls the consumer callback wrapper. queue_object (pika.adapters.twisted_connection.ClosableDeferredQueue): The AMQP queue the consumer is bound to. consumer (dict): A dictionary describing the consumer for the given queue_object. """ while self._running: try: _channel, delivery_frame, properties, body = yield queue_object.get() except (error.ConnectionDone, ChannelClosedByClient): # This is deliberate. _legacy_twisted_log.msg( "Stopping the AMQP consumer with tag {tag}", tag=consumer.tag ) break except pika.exceptions.ChannelClosed as e: _legacy_twisted_log.msg( "Stopping AMQP consumer {tag} for queue {q}: {e}", tag=consumer.tag, q=consumer.queue, e=str(e), logLevel=logging.ERROR, ) break except pika.exceptions.ConsumerCancelled as e: _legacy_twisted_log.msg( "The AMQP broker canceled consumer {tag} on queue {q}: {e}", tag=consumer.tag, q=consumer.queue, e=str(e), logLevel=logging.ERROR, ) break except Exception: _legacy_twisted_log.msg( "An unexpected error occurred consuming from queue {q}", q=consumer.queue, logLevel=logging.ERROR, ) break if body: yield self._on_message(delivery_frame, properties, body, consumer)
[ "def", "_read", "(", "self", ",", "queue_object", ",", "consumer", ")", ":", "while", "self", ".", "_running", ":", "try", ":", "_channel", ",", "delivery_frame", ",", "properties", ",", "body", "=", "yield", "queue_object", ".", "get", "(", ")", "except", "(", "error", ".", "ConnectionDone", ",", "ChannelClosedByClient", ")", ":", "# This is deliberate.", "_legacy_twisted_log", ".", "msg", "(", "\"Stopping the AMQP consumer with tag {tag}\"", ",", "tag", "=", "consumer", ".", "tag", ")", "break", "except", "pika", ".", "exceptions", ".", "ChannelClosed", "as", "e", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Stopping AMQP consumer {tag} for queue {q}: {e}\"", ",", "tag", "=", "consumer", ".", "tag", ",", "q", "=", "consumer", ".", "queue", ",", "e", "=", "str", "(", "e", ")", ",", "logLevel", "=", "logging", ".", "ERROR", ",", ")", "break", "except", "pika", ".", "exceptions", ".", "ConsumerCancelled", "as", "e", ":", "_legacy_twisted_log", ".", "msg", "(", "\"The AMQP broker canceled consumer {tag} on queue {q}: {e}\"", ",", "tag", "=", "consumer", ".", "tag", ",", "q", "=", "consumer", ".", "queue", ",", "e", "=", "str", "(", "e", ")", ",", "logLevel", "=", "logging", ".", "ERROR", ",", ")", "break", "except", "Exception", ":", "_legacy_twisted_log", ".", "msg", "(", "\"An unexpected error occurred consuming from queue {q}\"", ",", "q", "=", "consumer", ".", "queue", ",", "logLevel", "=", "logging", ".", "ERROR", ",", ")", "break", "if", "body", ":", "yield", "self", ".", "_on_message", "(", "delivery_frame", ",", "properties", ",", "body", ",", "consumer", ")" ]
The loop that reads from the message queue and calls the consumer callback wrapper. queue_object (pika.adapters.twisted_connection.ClosableDeferredQueue): The AMQP queue the consumer is bound to. consumer (dict): A dictionary describing the consumer for the given queue_object.
[ "The", "loop", "that", "reads", "from", "the", "message", "queue", "and", "calls", "the", "consumer", "callback", "wrapper", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L659-L704
train
A generator that yields messages from the given queue and calls the consumer callback with the result.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJv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as5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1001 + 0o146) + '\x31' + chr(0b11101 + 0o26) + chr(0b10011 + 0o37), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(2552 - 2441) + chr(51) + chr(49) + chr(0b10001 + 0o46), 57498 - 57490), nzTpIcepk0o8(chr(48) + '\x6f' + '\x36' + chr(0b100101 + 0o20), ord("\x08")), nzTpIcepk0o8('\x30' + chr(2683 - 2572) + chr(51) + chr(0b1111 + 0o47) + chr(960 - 906), 34979 - 34971), nzTpIcepk0o8('\060' + chr(6727 - 6616) + '\x32' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + chr(0b100011 + 0o20) + chr(0b100000 + 0o25) + chr(2843 - 2788), 15343 - 15335), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(55) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(9801 - 9690) + chr(50) + chr(0b100011 + 0o24) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5374 - 5263) + chr(598 - 549) + chr(49) + '\067', 38410 - 38402), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110) + chr(0b11110 + 0o26), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(2406 - 2353) + '\x36', 41457 - 41449), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110110) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(2222 - 2173) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(50) + chr(0b110100), 19181 - 19173), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(9082 - 8971) + '\x31' + '\063' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(1494 - 1444) + chr(55) + '\061', 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b10111 + 0o33) + chr(2232 - 2181) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10110 + 0o131) + chr(655 - 606) + chr(1256 - 1207) + chr(0b101001 + 0o12), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\060', 0b1000), nzTpIcepk0o8(chr(1988 - 1940) + '\157' + '\x32' + chr(1172 - 1122) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + '\061' + chr(2322 - 2267) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1315 - 1261) + chr(53), 8), nzTpIcepk0o8('\x30' + chr(111) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(0b110010) + chr(137 - 83) + '\065', 47435 - 47427), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(1311 - 1257) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(802 - 753) + chr(792 - 738) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2743 - 2690) + '\x32', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(48) + chr(0b101000 + 0o13), 0o10), nzTpIcepk0o8(chr(2014 - 1966) + chr(0b11101 + 0o122) + chr(0b110000 + 0o1) + chr(1902 - 1853), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\064' + '\x33', 0o10), nzTpIcepk0o8(chr(1426 - 1378) + chr(2142 - 2031) + '\060', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(1674 - 1625) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(1630 - 1579) + '\x35' + '\061', 19380 - 19372), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + chr(0b110011 + 0o1), 46329 - 46321), nzTpIcepk0o8(chr(2161 - 2113) + chr(0b11011 + 0o124) + '\x37' + chr(2107 - 2057), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\066' + chr(0b10000 + 0o47), 8), nzTpIcepk0o8(chr(48) + chr(2689 - 2578) + chr(0b110010) + chr(1445 - 1394) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\x30', 0b1000), nzTpIcepk0o8(chr(1715 - 1667) + '\x6f' + chr(1616 - 1566) + chr(0b11010 + 0o27) + chr(0b110100), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2023 - 1975) + '\157' + chr(2192 - 2139) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b't'), chr(0b110001 + 0o63) + chr(101) + chr(4980 - 4881) + chr(111) + chr(0b11101 + 0o107) + chr(0b10111 + 0o116))(chr(117) + '\164' + chr(0b100011 + 0o103) + chr(0b101101) + chr(1793 - 1737)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def nah1yE9Swp1G(hXMPsSrOQzbh, vmFhzSM1J84b, Fz9tLfvnh2vf): while roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x13\x89\x01\xb1#\xad\xcf\x8e?]<\x97'), chr(0b10 + 0o142) + chr(0b10111 + 0o116) + '\143' + chr(111) + chr(1790 - 1690) + chr(0b1001000 + 0o35))(chr(0b0 + 0o165) + chr(3096 - 2980) + chr(102) + chr(0b10100 + 0o31) + '\x38')): try: (oO1rBQeetvBW, MiCxR_ginZ7Z, UtZvTnutzMHg, ryRPGaxqs24n) = (yield vmFhzSM1J84b.GUKetu4xaGsJ()) except (roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b'\x19\xa0[\x98v\x8c\x88\xd0 Z*\x9b\xa4q'), chr(7162 - 7062) + '\x65' + '\x63' + chr(0b1101111) + '\144' + '\x65')(chr(117) + '\164' + chr(102) + '\055' + chr(0b111000))), cZmJzz8tge80): roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b')\xa3Q\x8cq\xa7\x8a\xdcws_\xa7'), chr(6201 - 6101) + '\145' + chr(0b111101 + 0o46) + '\157' + chr(0b1100100) + chr(0b100111 + 0o76))('\x75' + '\x74' + chr(2084 - 1982) + chr(731 - 686) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b"\t\xbbZ\x86c\x86\x92\xdeo@\x06\x91\xeaU\x14\xe8\xc9ks\xff\x17Fu\xd8m\xc1W]\xea}\xcb \xbc\x88c\x1a\x0c\xeay\xeb'"), chr(6312 - 6212) + chr(101) + '\143' + chr(0b1101111) + chr(1308 - 1208) + '\145')(chr(9053 - 8936) + '\164' + '\146' + chr(0b101010 + 0o3) + '\x38'), tag=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\x1b\xffR\xa0R\xad\x94\xf1%W]\xb8'), chr(0b1100100) + chr(0b1100101) + chr(9008 - 8909) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(5862 - 5745) + '\x74' + chr(0b1100110) + chr(0b101001 + 0o4) + chr(0b11010 + 0o36)))) break except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\x19\xa7T\x98}\x8a\x90\xfa#[\x1d\x91\xae'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1010 + 0o132) + chr(0b1100101))(chr(0b1110101) + '\164' + '\146' + '\x2d' + '\070')) as wgf0sgcu_xPL: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b')\xa3Q\x8cq\xa7\x8a\xdcws_\xa7'), chr(1898 - 1798) + chr(6623 - 6522) + '\x63' + '\x6f' + '\144' + '\x65')(chr(0b10101 + 0o140) + '\x74' + '\x66' + '\x2d' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\t\xbbZ\x86c\x86\x92\xdeou#\xa5\x9a4:\xd6\xf78e\xfd\x1cG \xce|\xd2\x10W\xa3o\xccr\xe8\x98q_\x02\xfb8\xf7+\xb2\x0f\xd6h\x8a\x81'), chr(0b1100100) + chr(0b1000100 + 0o41) + chr(449 - 350) + chr(0b1101111) + chr(100) + '\145')(chr(0b1101000 + 0o15) + chr(0b1110100) + chr(1536 - 1434) + chr(0b101101) + '\x38'), tag=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\x1b\xffR\xa0R\xad\x94\xf1%W]\xb8'), '\x64' + chr(0b1100101) + chr(99) + chr(0b10111 + 0o130) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + '\x66' + chr(0b101101) + '\x38')), q=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'3\x9dV\xb0~\x8d\xcd\x8e\x08\x03\x0f\xad'), '\x64' + chr(7694 - 7593) + '\x63' + '\157' + chr(0b1011111 + 0o5) + chr(101))('\x75' + chr(0b1110100) + chr(0b100110 + 0o100) + chr(45) + chr(1406 - 1350))), e=N9zlRy29S1SS(wgf0sgcu_xPL), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\x14\xa9F\xbf}\xa8\xca\xc3-EY\xc4'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b110111 + 0o76) + chr(3095 - 2979) + chr(0b1100110) + chr(0b0 + 0o55) + chr(0b111000)))) break except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\x19\xa0[\x85f\x82\x99\xcb\x0cU\x00\x97\xafx5\xdc\xfd'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + '\144' + chr(1591 - 1490))(chr(0b101011 + 0o112) + '\164' + chr(0b1011 + 0o133) + '\x2d' + '\070')) as wgf0sgcu_xPL: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b')\xa3Q\x8cq\xa7\x8a\xdcws_\xa7'), '\144' + chr(0b1100101 + 0o0) + '\x63' + chr(0b1011110 + 0o21) + '\x64' + chr(8968 - 8867))(chr(0b1110101) + chr(116) + chr(0b11001 + 0o115) + chr(1887 - 1842) + chr(841 - 785)))(roI3spqORKae(ES5oEprVxulp(b'\x0e\xa7P\xd6R\xa2\xad\xe9oV\x1c\x9b\xa1q+\x99\xfa*~\xf3\x1cYe\xd1(\xd0\x18D\xf0|\xcee\xba\xc9\x7fN\x16\xf9e\xac5\xa1\x15\x87f\x8a\x89\xdcoO\x1f\x89\xf04"\xdc\xe4'), chr(2358 - 2258) + chr(0b1100101) + '\x63' + chr(111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + '\055' + chr(350 - 294)), tag=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\x1b\xffR\xa0R\xad\x94\xf1%W]\xb8'), '\x64' + chr(640 - 539) + chr(7610 - 7511) + chr(0b1101111) + chr(5511 - 5411) + chr(8021 - 7920))(chr(117) + '\164' + chr(102) + chr(45) + chr(0b110 + 0o62))), q=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'3\x9dV\xb0~\x8d\xcd\x8e\x08\x03\x0f\xad'), '\144' + chr(101) + chr(4677 - 4578) + '\x6f' + chr(100) + chr(8838 - 8737))(chr(0b1011101 + 0o30) + '\x74' + chr(0b10000 + 0o126) + '\055' + chr(56))), e=N9zlRy29S1SS(wgf0sgcu_xPL), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\x14\xa9F\xbf}\xa8\xca\xc3-EY\xc4'), chr(7902 - 7802) + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')('\165' + chr(5340 - 5224) + '\x66' + chr(0b1 + 0o54) + '\x38'))) break except zfo2Sgkz3IVJ: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b')\xa3Q\x8cq\xa7\x8a\xdcws_\xa7'), chr(0b1100100) + '\x65' + chr(4229 - 4130) + chr(111) + '\x64' + '\x65')(chr(0b1100111 + 0o16) + '\x74' + chr(102) + '\x2d' + chr(2292 - 2236)))(roI3spqORKae(ES5oEprVxulp(b'\x1b\xa1\x15\x83}\x8a\x84\xc9*W\x1a\x91\xae4<\xcb\xeb$b\xb0\x16Vc\xc0z\xc1\x12N\xa3j\xccn\xbb\x9ciS\x19\xf98\xea(\xa0X\xd6b\x9a\x99\xcc*\x14\x15\x85\xb7'), '\144' + chr(0b1100101) + '\143' + '\157' + chr(0b110 + 0o136) + chr(0b1100101))('\x75' + chr(959 - 843) + '\146' + chr(45) + chr(2022 - 1966)), q=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'3\x9dV\xb0~\x8d\xcd\x8e\x08\x03\x0f\xad'), '\x64' + '\145' + chr(0b10011 + 0o120) + '\x6f' + chr(0b1000 + 0o134) + chr(0b1100 + 0o131))(chr(0b0 + 0o165) + '\164' + chr(102) + chr(45) + chr(0b111000))), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\x14\xa9F\xbf}\xa8\xca\xc3-EY\xc4'), '\144' + '\x65' + '\x63' + chr(0b1101111) + chr(5011 - 4911) + chr(5867 - 5766))(chr(0b1110101) + chr(10673 - 10557) + chr(102) + chr(0b101101) + chr(56)))) break if ryRPGaxqs24n: yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x05\xa0[\xa9~\x8a\x8f\xca.S\x0b'), chr(9634 - 9534) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(1824 - 1722) + chr(1669 - 1624) + '\x38'))(MiCxR_ginZ7Z, UtZvTnutzMHg, ryRPGaxqs24n, Fz9tLfvnh2vf)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocol._on_message
def _on_message(self, delivery_frame, properties, body, consumer): """ Callback when a message is received from the server. This method wraps a user-registered callback for message delivery. It decodes the message body, determines the message schema to validate the message with, and validates the message before passing it on to the user callback. This also handles acking, nacking, and rejecting messages based on exceptions raised by the consumer callback. For detailed documentation on the user-provided callback, see the user guide on consuming. Args: delivery_frame (pika.spec.Deliver): The delivery frame which includes details about the message like content encoding and its delivery tag. properties (pika.spec.BasicProperties): The message properties like the message headers. body (bytes): The message payload. consumer (dict): A dictionary describing the consumer of the message. Returns: Deferred: fired when the message has been handled. """ _legacy_twisted_log.msg( "Message arrived with delivery tag {tag} for {consumer}", tag=delivery_frame.delivery_tag, consumer=consumer, logLevel=logging.DEBUG, ) try: message = get_message(delivery_frame.routing_key, properties, body) message.queue = consumer.queue except ValidationError: _legacy_twisted_log.msg( "Message id {msgid} did not pass validation; ignoring message", msgid=properties.message_id, logLevel=logging.WARNING, ) yield consumer.channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) return try: _legacy_twisted_log.msg( "Consuming message from topic {topic!r} (id {msgid})", topic=message.topic, msgid=properties.message_id, ) yield defer.maybeDeferred(consumer.callback, message) except Nack: _legacy_twisted_log.msg( "Returning message id {msgid} to the queue", msgid=properties.message_id, logLevel=logging.WARNING, ) yield consumer.channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=True ) except Drop: _legacy_twisted_log.msg( "Consumer requested message id {msgid} be dropped", msgid=properties.message_id, logLevel=logging.WARNING, ) yield consumer.channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) except HaltConsumer: _legacy_twisted_log.msg( "Consumer indicated it wishes consumption to halt, shutting down" ) yield consumer.channel.basic_ack(delivery_tag=delivery_frame.delivery_tag) yield self.cancel(consumer.queue) except Exception: _legacy_twisted_log.msg( "Received unexpected exception from consumer {c}", c=consumer, logLevel=logging.ERROR, ) yield consumer.channel.basic_nack( delivery_tag=0, multiple=True, requeue=True ) yield self.cancel(consumer.queue) else: yield consumer.channel.basic_ack(delivery_tag=delivery_frame.delivery_tag)
python
def _on_message(self, delivery_frame, properties, body, consumer): """ Callback when a message is received from the server. This method wraps a user-registered callback for message delivery. It decodes the message body, determines the message schema to validate the message with, and validates the message before passing it on to the user callback. This also handles acking, nacking, and rejecting messages based on exceptions raised by the consumer callback. For detailed documentation on the user-provided callback, see the user guide on consuming. Args: delivery_frame (pika.spec.Deliver): The delivery frame which includes details about the message like content encoding and its delivery tag. properties (pika.spec.BasicProperties): The message properties like the message headers. body (bytes): The message payload. consumer (dict): A dictionary describing the consumer of the message. Returns: Deferred: fired when the message has been handled. """ _legacy_twisted_log.msg( "Message arrived with delivery tag {tag} for {consumer}", tag=delivery_frame.delivery_tag, consumer=consumer, logLevel=logging.DEBUG, ) try: message = get_message(delivery_frame.routing_key, properties, body) message.queue = consumer.queue except ValidationError: _legacy_twisted_log.msg( "Message id {msgid} did not pass validation; ignoring message", msgid=properties.message_id, logLevel=logging.WARNING, ) yield consumer.channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) return try: _legacy_twisted_log.msg( "Consuming message from topic {topic!r} (id {msgid})", topic=message.topic, msgid=properties.message_id, ) yield defer.maybeDeferred(consumer.callback, message) except Nack: _legacy_twisted_log.msg( "Returning message id {msgid} to the queue", msgid=properties.message_id, logLevel=logging.WARNING, ) yield consumer.channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=True ) except Drop: _legacy_twisted_log.msg( "Consumer requested message id {msgid} be dropped", msgid=properties.message_id, logLevel=logging.WARNING, ) yield consumer.channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=False ) except HaltConsumer: _legacy_twisted_log.msg( "Consumer indicated it wishes consumption to halt, shutting down" ) yield consumer.channel.basic_ack(delivery_tag=delivery_frame.delivery_tag) yield self.cancel(consumer.queue) except Exception: _legacy_twisted_log.msg( "Received unexpected exception from consumer {c}", c=consumer, logLevel=logging.ERROR, ) yield consumer.channel.basic_nack( delivery_tag=0, multiple=True, requeue=True ) yield self.cancel(consumer.queue) else: yield consumer.channel.basic_ack(delivery_tag=delivery_frame.delivery_tag)
[ "def", "_on_message", "(", "self", ",", "delivery_frame", ",", "properties", ",", "body", ",", "consumer", ")", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Message arrived with delivery tag {tag} for {consumer}\"", ",", "tag", "=", "delivery_frame", ".", "delivery_tag", ",", "consumer", "=", "consumer", ",", "logLevel", "=", "logging", ".", "DEBUG", ",", ")", "try", ":", "message", "=", "get_message", "(", "delivery_frame", ".", "routing_key", ",", "properties", ",", "body", ")", "message", ".", "queue", "=", "consumer", ".", "queue", "except", "ValidationError", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Message id {msgid} did not pass validation; ignoring message\"", ",", "msgid", "=", "properties", ".", "message_id", ",", "logLevel", "=", "logging", ".", "WARNING", ",", ")", "yield", "consumer", ".", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "False", ")", "return", "try", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Consuming message from topic {topic!r} (id {msgid})\"", ",", "topic", "=", "message", ".", "topic", ",", "msgid", "=", "properties", ".", "message_id", ",", ")", "yield", "defer", ".", "maybeDeferred", "(", "consumer", ".", "callback", ",", "message", ")", "except", "Nack", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Returning message id {msgid} to the queue\"", ",", "msgid", "=", "properties", ".", "message_id", ",", "logLevel", "=", "logging", ".", "WARNING", ",", ")", "yield", "consumer", ".", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "True", ")", "except", "Drop", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Consumer requested message id {msgid} be dropped\"", ",", "msgid", "=", "properties", ".", "message_id", ",", "logLevel", "=", "logging", ".", "WARNING", ",", ")", "yield", "consumer", ".", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "False", ")", "except", "HaltConsumer", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Consumer indicated it wishes consumption to halt, shutting down\"", ")", "yield", "consumer", ".", "channel", ".", "basic_ack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ")", "yield", "self", ".", "cancel", "(", "consumer", ".", "queue", ")", "except", "Exception", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Received unexpected exception from consumer {c}\"", ",", "c", "=", "consumer", ",", "logLevel", "=", "logging", ".", "ERROR", ",", ")", "yield", "consumer", ".", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "0", ",", "multiple", "=", "True", ",", "requeue", "=", "True", ")", "yield", "self", ".", "cancel", "(", "consumer", ".", "queue", ")", "else", ":", "yield", "consumer", ".", "channel", ".", "basic_ack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ")" ]
Callback when a message is received from the server. This method wraps a user-registered callback for message delivery. It decodes the message body, determines the message schema to validate the message with, and validates the message before passing it on to the user callback. This also handles acking, nacking, and rejecting messages based on exceptions raised by the consumer callback. For detailed documentation on the user-provided callback, see the user guide on consuming. Args: delivery_frame (pika.spec.Deliver): The delivery frame which includes details about the message like content encoding and its delivery tag. properties (pika.spec.BasicProperties): The message properties like the message headers. body (bytes): The message payload. consumer (dict): A dictionary describing the consumer of the message. Returns: Deferred: fired when the message has been handled.
[ "Callback", "when", "a", "message", "is", "received", "from", "the", "server", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L707-L794
train
A message arrived from the server.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq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Qt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101101 + 0o2) + chr(0b110011) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(50) + '\x34' + chr(52), 37450 - 37442), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(1416 - 1365) + chr(0b110100) + chr(0b10 + 0o63), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11000 + 0o127) + chr(0b101010 + 0o6), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1382 - 1331) + chr(0b100110 + 0o21) + chr(873 - 825), 50238 - 50230), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\x34' + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2185 - 2136) + chr(52) + chr(0b110111), 8), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + chr(0b10 + 0o61) + chr(0b110011) + chr(971 - 920), 55060 - 55052), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b110010 + 0o4) + '\x32', 21520 - 21512), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b101000 + 0o107) + chr(0b110011) + '\063', 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + '\x32' + chr(0b10001 + 0o45) + chr(0b110000), 16402 - 16394), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x31' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\060', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(874 - 826) + chr(54), 49508 - 49500), nzTpIcepk0o8(chr(48) + chr(111) + chr(1015 - 965) + chr(0b101011 + 0o7) + chr(0b110010), 45662 - 45654), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(54) + chr(2155 - 2102), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2216 - 2166) + chr(0b110110) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4765 - 4654) + chr(0b110010) + chr(0b100111 + 0o12) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(2087 - 2039) + chr(0b1000011 + 0o54) + chr(51) + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\062' + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(8476 - 8365) + chr(257 - 208) + '\x34' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b1110 + 0o45) + chr(51), 25998 - 25990), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(812 - 762) + chr(0b101011 + 0o7) + chr(0b1011 + 0o47), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110100) + '\x35', 0b1000), nzTpIcepk0o8(chr(1393 - 1345) + chr(3474 - 3363) + chr(51) + chr(0b110001) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(0b10 + 0o155) + chr(598 - 547) + '\060' + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b10101 + 0o36) + chr(0b11111 + 0o25) + chr(1683 - 1633), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b110100 + 0o1) + chr(0b10110 + 0o36), 44053 - 44045), nzTpIcepk0o8(chr(48) + chr(1210 - 1099) + '\063' + '\062' + chr(1974 - 1925), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\067' + chr(834 - 782), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100100 + 0o113) + chr(49) + chr(1756 - 1701), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110110) + chr(1590 - 1535), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\061' + chr(52) + chr(0b11101 + 0o23), 0b1000), nzTpIcepk0o8(chr(322 - 274) + chr(0b1101111) + '\x33' + chr(1959 - 1907) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b110011) + '\062', 34868 - 34860), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\067', 17630 - 17622), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(787 - 738) + '\060' + '\065', 0o10), nzTpIcepk0o8(chr(353 - 305) + '\157' + chr(49) + '\065' + chr(0b0 + 0o66), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(721 - 670) + chr(0b10110 + 0o37), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\065' + '\064', 62849 - 62841)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(53) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'7'), '\x64' + chr(0b1100101) + chr(9738 - 9639) + '\x6f' + chr(100) + chr(101))(chr(7608 - 7491) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def M9fgWFBTjSsr(hXMPsSrOQzbh, MiCxR_ginZ7Z, UtZvTnutzMHg, ryRPGaxqs24n, Fz9tLfvnh2vf): roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'j\xc8\x81z\x9a/\x11\xbe\xca\\\x81\x1c'), '\144' + chr(0b1100101) + '\x63' + chr(2149 - 2038) + chr(0b1100100) + '\x65')(chr(117) + '\x74' + chr(0b1100110) + chr(1129 - 1084) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'T\xc1\x96s\x99\x00\x02\xfb\x93i\xc2&v\xa3\xf6U\xc3\xe7m\xfeD?\xf7I\xa3\xb0\x87\xde\xa8\x9c{\x16\x07\xc6ak$\t\xe0\xcc\x7f\xcb\x97 \x83\x04\x08\xb5\x81n\xdd*r\xbb'), chr(0b1100100) + chr(101) + chr(0b10001 + 0o122) + chr(0b1101111) + '\x64' + chr(0b1001001 + 0o34))(chr(0b1110101) + '\x74' + chr(0b1100001 + 0o5) + '\x2d' + '\x38'), tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'p\xf1\xb41\x8b/V\xe9\x98-\xd6|'), chr(0b101100 + 0o70) + '\x65' + chr(943 - 844) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1010000 + 0o44) + chr(0b1100110) + chr(523 - 478) + chr(0b111000))), consumer=Fz9tLfvnh2vf, logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'A\xe7\x91m\xaf\x15)\xab\xadB\xfby'), '\144' + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(101))('\165' + chr(0b1110100) + chr(10135 - 10033) + '\x2d' + chr(0b111000)))) try: FksNMH1w_ns6 = KB3qSwugcArA(MiCxR_ginZ7Z.routing_key, UtZvTnutzMHg, ryRPGaxqs24n) FksNMH1w_ns6.iRcFmb17G7aY = Fz9tLfvnh2vf.iRcFmb17G7aY except NvSA9vIojSzD: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'j\xc8\x81z\x9a/\x11\xbe\xca\\\x81\x1c'), chr(100) + chr(0b1001100 + 0o31) + '\143' + '\157' + chr(0b101001 + 0o73) + '\x65')('\165' + chr(116) + '\x66' + chr(0b101101) + chr(0b10 + 0o66)))(roI3spqORKae(ES5oEprVxulp(b'T\xc1\x96s\x99\x00\x02\xfb\x9b\x7f\x904m\xb5\xf5\x1c\xd0\xf39\xf2\r?\xb2K\xa5\xb2\xc2\xdc\xb0\xcf|W\x16\x87vv!\x0f\xe9\x85v\xca\xde \x91\x00\t\xb4\x80r\xde( \xab\xf7\x06\xc7\xef~\xf3'), chr(100) + chr(0b1000 + 0o135) + '\143' + chr(11228 - 11117) + chr(100) + chr(6189 - 6088))(chr(13382 - 13265) + '\164' + chr(4604 - 4502) + chr(0b101101) + '\x38'), msgid=roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b't\xc1\x96s\x99\x00\x02\x84\x9b\x7f'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100 + 0o130) + chr(8593 - 8492))(chr(9032 - 8915) + chr(116) + chr(0b1010011 + 0o23) + '\055' + chr(56))), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'N\xe5\xb7N\xb1) '), '\144' + '\x65' + chr(0b1100011) + chr(310 - 199) + '\x64' + chr(7772 - 7671))(chr(0b1110101) + chr(0b0 + 0o164) + chr(102) + chr(45) + '\x38'))) yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'{\xc5\x96i\x9b8\t\xba\x91p'), '\x64' + chr(0b101100 + 0o71) + chr(99) + '\x6f' + '\144' + chr(101))('\x75' + chr(1996 - 1880) + '\x66' + '\x2d' + chr(2106 - 2050)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'p\xf1\xb41\x8b/V\xe9\x98-\xd6|'), '\x64' + chr(101) + chr(3471 - 3372) + '\157' + chr(9049 - 8949) + '\145')('\x75' + chr(0b101011 + 0o111) + chr(4946 - 4844) + chr(45) + chr(56))), requeue=nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(48), 8)) return try: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'j\xc8\x81z\x9a/\x11\xbe\xca\\\x81\x1c'), chr(0b111011 + 0o51) + chr(101) + chr(0b1100011) + chr(0b110110 + 0o71) + '\144' + chr(101))(chr(5870 - 5753) + chr(116) + chr(102) + chr(45) + chr(0b110001 + 0o7)))(roI3spqORKae(ES5oEprVxulp(b'Z\xcb\x8bs\x8d\n\x0e\xb5\x95;\xdd*s\xb5\xf3\x12\xd1\xae\x7f\xe4\x0b6\xb2Q\xa5\xb6\x8b\xcf\xf1\xc7{\x18\x10\x8fy>7\x13\xbd\xc4p\xc0\xc5{\x95\x14\x00\xb2\x96f\x99'), '\x64' + chr(0b110101 + 0o60) + chr(0b1100001 + 0o2) + chr(0b1101111) + chr(100) + chr(101))('\x75' + chr(0b111101 + 0o67) + chr(102) + '\055' + chr(0b111000)), topic=roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'|\xc0\x81D\xbe("\x9d\x8b)\xd4\x07'), chr(2939 - 2839) + '\x65' + chr(0b110011 + 0o60) + '\157' + chr(0b1100100) + chr(101))(chr(10626 - 10509) + chr(0b101110 + 0o106) + '\146' + '\x2d' + chr(1787 - 1731))), msgid=roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b't\xc1\x96s\x99\x00\x02\x84\x9b\x7f'), chr(0b101101 + 0o67) + '\x65' + '\143' + chr(1145 - 1034) + '\x64' + '\x65')(chr(0b100110 + 0o117) + chr(0b1101011 + 0o11) + chr(0b10100 + 0o122) + chr(0b11010 + 0o23) + chr(0b111000)))) yield roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b't\xc5\x9cb\x9d#\x02\xbd\x97i\xc2*d'), '\144' + chr(0b1010010 + 0o23) + chr(9316 - 9217) + chr(3812 - 3701) + chr(0b1000 + 0o134) + chr(0b111001 + 0o54))(chr(0b10000 + 0o145) + '\x74' + '\146' + '\055' + '\x38'))(roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b's\xe3\xd0K\xadS2\x8e\xb5u\xdbz'), chr(8514 - 8414) + chr(4222 - 4121) + chr(0b1100011) + '\157' + '\144' + chr(9587 - 9486))(chr(0b1110101) + chr(0b110011 + 0o101) + '\146' + '\055' + '\x38')), FksNMH1w_ns6) except RRYFQBQwTJsn: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'j\xc8\x81z\x9a/\x11\xbe\xca\\\x81\x1c'), chr(100) + '\145' + '\x63' + '\x6f' + '\x64' + '\x65')(chr(0b1110101) + chr(11667 - 11551) + '\146' + chr(0b101101) + chr(0b110100 + 0o4)))(roI3spqORKae(ES5oEprVxulp(b'K\xc1\x91u\x8a\t\x0e\xb5\x95;\xdd*s\xb5\xf3\x12\xd1\xaep\xf2D \xffV\xad\xaf\x86\xd1\xf1\xc8`W\x14\x8e\x7f?4\x1b\xf8\x99|'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + chr(8667 - 8567) + chr(3090 - 2989))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(2452 - 2396)), msgid=roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b't\xc1\x96s\x99\x00\x02\x84\x9b\x7f'), '\x64' + chr(0b1100101) + chr(3886 - 3787) + '\157' + chr(0b1100100) + chr(101))('\165' + chr(757 - 641) + chr(0b100 + 0o142) + '\055' + '\x38')), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'N\xe5\xb7N\xb1) '), chr(0b1100100) + chr(7568 - 7467) + '\143' + '\157' + chr(100) + chr(101))(chr(0b101110 + 0o107) + chr(0b1000 + 0o154) + chr(0b1100110) + chr(0b11 + 0o52) + chr(0b11000 + 0o40)))) yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'{\xc5\x96i\x9b8\t\xba\x91p'), chr(100) + chr(101) + chr(5667 - 5568) + chr(0b11010 + 0o125) + '\x64' + chr(0b111011 + 0o52))('\165' + chr(0b110 + 0o156) + '\x66' + chr(1480 - 1435) + '\x38'))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'p\xf1\xb41\x8b/V\xe9\x98-\xd6|'), '\144' + '\145' + chr(0b1011011 + 0o10) + chr(0b100110 + 0o111) + '\144' + chr(101))(chr(117) + chr(116) + '\146' + '\x2d' + chr(1505 - 1449))), requeue=nzTpIcepk0o8('\x30' + chr(0b110011 + 0o74) + '\x31', 17462 - 17454)) except RkldlnaoMWPV: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'j\xc8\x81z\x9a/\x11\xbe\xca\\\x81\x1c'), chr(0b111011 + 0o51) + chr(0b10111 + 0o116) + chr(99) + '\157' + '\x64' + chr(101))('\165' + chr(0b1010011 + 0o41) + chr(6958 - 6856) + chr(0b101101) + chr(1881 - 1825)))(roI3spqORKae(ES5oEprVxulp(b'Z\xcb\x8bs\x8d\n\x02\xa9\xd2i\xd5>u\xa3\xe1\x01\xd1\xea9\xfb\x01(\xe1D\xad\xa3\xc2\xc5\xb5\x9ct\x1a\x13\x81s{8N\xff\x899\xc0\x97o\x88\x17\x02\xbf'), '\144' + chr(101) + '\143' + chr(0b1101111) + '\144' + chr(101))('\x75' + chr(0b1110100) + chr(102) + chr(1546 - 1501) + '\x38'), msgid=roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b't\xc1\x96s\x99\x00\x02\x84\x9b\x7f'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b101101 + 0o70))('\x75' + '\164' + chr(9161 - 9059) + '\055' + chr(0b111 + 0o61))), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'N\xe5\xb7N\xb1) '), chr(0b111110 + 0o46) + chr(6527 - 6426) + chr(5359 - 5260) + chr(0b111010 + 0o65) + chr(0b1100100) + chr(0b110100 + 0o61))('\165' + chr(0b1100010 + 0o22) + '\146' + chr(45) + chr(56)))) yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'{\xc5\x96i\x9b8\t\xba\x91p'), '\x64' + chr(0b1100101) + chr(0b101010 + 0o71) + '\x6f' + chr(0b11000 + 0o114) + chr(101))(chr(117) + chr(8255 - 8139) + chr(0b1100110) + chr(0b101101) + '\070'))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'p\xf1\xb41\x8b/V\xe9\x98-\xd6|'), '\x64' + chr(0b11110 + 0o107) + chr(0b1100011) + '\x6f' + '\x64' + '\x65')('\165' + '\164' + '\146' + chr(0b11100 + 0o21) + chr(0b111000))), requeue=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000), 8)) except Mu3Zfzebdly9: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'j\xc8\x81z\x9a/\x11\xbe\xca\\\x81\x1c'), chr(100) + '\x65' + chr(0b1100011) + '\157' + '\144' + chr(101))('\165' + chr(116) + chr(6239 - 6137) + '\x2d' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b"Z\xcb\x8bs\x8d\n\x02\xa9\xd2r\xde+i\xa5\xf3\x01\xd1\xea9\xff\x10{\xe5L\xb9\xae\x87\xdf\xf1\xdf`\x19\x13\x93wo1\x07\xf2\x829\xd0\x8a \x90\x06\x0b\xaf\xde;\xc3'u\xb2\xe6\x1c\xda\xe99\xf2\x0b,\xfc"), '\x64' + '\x65' + chr(6550 - 6451) + chr(0b10111 + 0o130) + chr(0b10001 + 0o123) + '\x65')(chr(0b1110101) + '\164' + '\x66' + '\055' + chr(0b110101 + 0o3))) yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'{\xc5\x96i\x9b8\x06\xb8\x99'), '\144' + chr(0b1100101) + chr(0b1010111 + 0o14) + '\157' + '\144' + chr(101))('\165' + '\x74' + chr(10370 - 10268) + chr(0b11111 + 0o16) + chr(56)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'p\xf1\xb41\x8b/V\xe9\x98-\xd6|'), chr(0b1100100) + chr(0b1100101) + chr(4703 - 4604) + chr(111) + chr(9439 - 9339) + chr(8587 - 8486))(chr(0b100011 + 0o122) + chr(0b1110100) + '\x66' + chr(45) + chr(0b100011 + 0o25)))) yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'z\xc5\x8bc\x9d\x0b'), chr(0b11100 + 0o110) + chr(0b1100101) + chr(5982 - 5883) + chr(111) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b101111 + 0o67) + '\x2d' + chr(0b10000 + 0o50)))(roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'p\xf6\x86F\x95\x05V\xec\xb5,\xd1\x16'), chr(0b1000011 + 0o41) + chr(101) + chr(1600 - 1501) + chr(0b110 + 0o151) + '\144' + chr(0b1100000 + 0o5))(chr(117) + chr(0b1 + 0o163) + '\146' + '\x2d' + '\x38'))) except zfo2Sgkz3IVJ: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'j\xc8\x81z\x9a/\x11\xbe\xca\\\x81\x1c'), chr(0b10000 + 0o124) + chr(101) + chr(99) + chr(0b1101111) + chr(945 - 845) + '\x65')('\x75' + '\164' + '\x66' + '\x2d' + chr(2744 - 2688)))(roI3spqORKae(ES5oEprVxulp(b'K\xc1\x86e\x91\x11\x02\xbf\xd2n\xde*x\xb6\xf7\x16\xc0\xeb}\xb6\x01#\xf1@\xba\xb2\x8b\xc3\xbf\x9ci\x05\x0f\x8b:|*\x00\xee\x99t\xc1\x97 \x83\x04\x1a'), chr(100) + chr(101) + chr(0b1100011) + chr(0b101110 + 0o101) + chr(2131 - 2031) + chr(0b100111 + 0o76))(chr(0b1100 + 0o151) + '\x74' + chr(102) + chr(0b101101) + '\070'), c=Fz9tLfvnh2vf, logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'W\xc2\x96I\x96 Q\xa1\x90j\x87\x7f'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(3385 - 3269) + chr(0b1001000 + 0o36) + chr(1171 - 1126) + chr(0b111000)))) yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'{\xc5\x96i\x9b8\t\xba\x91p'), chr(0b1000 + 0o134) + chr(101) + chr(0b1100011) + chr(111) + chr(1178 - 1078) + '\x65')('\x75' + chr(0b1000010 + 0o62) + '\146' + chr(45) + chr(0b111000)))(delivery_tag=nzTpIcepk0o8('\060' + chr(111) + chr(0b11100 + 0o24), 8), multiple=nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), 8), requeue=nzTpIcepk0o8('\x30' + '\157' + '\061', 8)) yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'z\xc5\x8bc\x9d\x0b'), chr(100) + chr(0b1000000 + 0o45) + chr(6643 - 6544) + chr(0b1101111) + chr(9867 - 9767) + chr(101))(chr(765 - 648) + chr(11544 - 11428) + '\x66' + '\055' + '\x38'))(roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'p\xf6\x86F\x95\x05V\xec\xb5,\xd1\x16'), '\x64' + chr(101) + chr(99) + chr(111) + chr(100) + chr(0b1100101))(chr(0b101110 + 0o107) + chr(1469 - 1353) + '\x66' + '\055' + chr(56)))) else: yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'{\xc5\x96i\x9b8\x06\xb8\x99'), chr(0b1100100) + chr(9169 - 9068) + '\x63' + chr(0b100000 + 0o117) + '\x64' + chr(7292 - 7191))('\165' + chr(0b1100100 + 0o20) + chr(0b1000101 + 0o41) + chr(0b101101) + chr(2957 - 2901)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'p\xf1\xb41\x8b/V\xe9\x98-\xd6|'), chr(0b1100010 + 0o2) + chr(101) + chr(99) + '\x6f' + '\x64' + '\x65')(chr(117) + chr(5604 - 5488) + chr(0b1100110) + chr(0b10100 + 0o31) + chr(0b111000))))
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocol.consume
def consume(self, callback, queue): """ Register a message consumer that executes the provided callback when messages are received. The queue must exist prior to calling this method. If a consumer already exists for the given queue, the callback is simply updated and any new messages for that consumer use the new callback. If :meth:`resumeProducing` has not been called when this method is called, it will be called for you. Args: callback (callable): The callback to invoke when a message is received. queue (str): The name of the queue to consume from. Returns: fedora_messaging.twisted.protocol.Consumer: A namedtuple that identifies this consumer. NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. """ if queue in self._consumers and self._consumers[queue].channel.is_open: consumer = Consumer( tag=self._consumers[queue].tag, queue=queue, callback=callback, channel=self._consumers[queue].channel, ) self._consumers[queue] = consumer defer.returnValue(consumer) channel = yield self._allocate_channel() consumer = Consumer( tag=str(uuid.uuid4()), queue=queue, callback=callback, channel=channel ) self._consumers[queue] = consumer if not self._running: yield self.resumeProducing() defer.returnValue(consumer) queue_object, _ = yield consumer.channel.basic_consume( queue=consumer.queue, consumer_tag=consumer.tag ) deferred = self._read(queue_object, consumer) deferred.addErrback( lambda f: _legacy_twisted_log.msg, "_read failed on consumer {c}", c=consumer, logLevel=logging.ERROR, ) _legacy_twisted_log.msg("Successfully registered AMQP consumer {c}", c=consumer) defer.returnValue(consumer)
python
def consume(self, callback, queue): """ Register a message consumer that executes the provided callback when messages are received. The queue must exist prior to calling this method. If a consumer already exists for the given queue, the callback is simply updated and any new messages for that consumer use the new callback. If :meth:`resumeProducing` has not been called when this method is called, it will be called for you. Args: callback (callable): The callback to invoke when a message is received. queue (str): The name of the queue to consume from. Returns: fedora_messaging.twisted.protocol.Consumer: A namedtuple that identifies this consumer. NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection. """ if queue in self._consumers and self._consumers[queue].channel.is_open: consumer = Consumer( tag=self._consumers[queue].tag, queue=queue, callback=callback, channel=self._consumers[queue].channel, ) self._consumers[queue] = consumer defer.returnValue(consumer) channel = yield self._allocate_channel() consumer = Consumer( tag=str(uuid.uuid4()), queue=queue, callback=callback, channel=channel ) self._consumers[queue] = consumer if not self._running: yield self.resumeProducing() defer.returnValue(consumer) queue_object, _ = yield consumer.channel.basic_consume( queue=consumer.queue, consumer_tag=consumer.tag ) deferred = self._read(queue_object, consumer) deferred.addErrback( lambda f: _legacy_twisted_log.msg, "_read failed on consumer {c}", c=consumer, logLevel=logging.ERROR, ) _legacy_twisted_log.msg("Successfully registered AMQP consumer {c}", c=consumer) defer.returnValue(consumer)
[ "def", "consume", "(", "self", ",", "callback", ",", "queue", ")", ":", "if", "queue", "in", "self", ".", "_consumers", "and", "self", ".", "_consumers", "[", "queue", "]", ".", "channel", ".", "is_open", ":", "consumer", "=", "Consumer", "(", "tag", "=", "self", ".", "_consumers", "[", "queue", "]", ".", "tag", ",", "queue", "=", "queue", ",", "callback", "=", "callback", ",", "channel", "=", "self", ".", "_consumers", "[", "queue", "]", ".", "channel", ",", ")", "self", ".", "_consumers", "[", "queue", "]", "=", "consumer", "defer", ".", "returnValue", "(", "consumer", ")", "channel", "=", "yield", "self", ".", "_allocate_channel", "(", ")", "consumer", "=", "Consumer", "(", "tag", "=", "str", "(", "uuid", ".", "uuid4", "(", ")", ")", ",", "queue", "=", "queue", ",", "callback", "=", "callback", ",", "channel", "=", "channel", ")", "self", ".", "_consumers", "[", "queue", "]", "=", "consumer", "if", "not", "self", ".", "_running", ":", "yield", "self", ".", "resumeProducing", "(", ")", "defer", ".", "returnValue", "(", "consumer", ")", "queue_object", ",", "_", "=", "yield", "consumer", ".", "channel", ".", "basic_consume", "(", "queue", "=", "consumer", ".", "queue", ",", "consumer_tag", "=", "consumer", ".", "tag", ")", "deferred", "=", "self", ".", "_read", "(", "queue_object", ",", "consumer", ")", "deferred", ".", "addErrback", "(", "lambda", "f", ":", "_legacy_twisted_log", ".", "msg", ",", "\"_read failed on consumer {c}\"", ",", "c", "=", "consumer", ",", "logLevel", "=", "logging", ".", "ERROR", ",", ")", "_legacy_twisted_log", ".", "msg", "(", "\"Successfully registered AMQP consumer {c}\"", ",", "c", "=", "consumer", ")", "defer", ".", "returnValue", "(", "consumer", ")" ]
Register a message consumer that executes the provided callback when messages are received. The queue must exist prior to calling this method. If a consumer already exists for the given queue, the callback is simply updated and any new messages for that consumer use the new callback. If :meth:`resumeProducing` has not been called when this method is called, it will be called for you. Args: callback (callable): The callback to invoke when a message is received. queue (str): The name of the queue to consume from. Returns: fedora_messaging.twisted.protocol.Consumer: A namedtuple that identifies this consumer. NoFreeChannels: If there are no available channels on this connection. If this occurs, you can either reduce the number of consumers on this connection or create an additional connection.
[ "Register", "a", "message", "consumer", "that", "executes", "the", "provided", "callback", "when", "messages", "are", "received", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L797-L852
train
Register a message consumer that executes the provided callback when a message is received.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuO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OfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(2590 - 2479) + chr(0b110010) + chr(406 - 354), 62863 - 62855), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + chr(0b110110 + 0o1) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + '\062' + '\x33' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(213 - 159) + chr(410 - 361), 0o10), nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + chr(0b110010) + '\060' + chr(48), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1010 + 0o50) + chr(0b1000 + 0o53) + chr(49), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(1703 - 1652) + chr(0b100010 + 0o25), 11696 - 11688), nzTpIcepk0o8('\x30' + '\x6f' + chr(412 - 362) + '\x37' + chr(0b101000 + 0o11), 48723 - 48715), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(2550 - 2497) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11975 - 11864) + '\063' + '\065' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x32' + chr(0b1011 + 0o52), 37517 - 37509), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(0b110010) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7381 - 7270) + chr(49) + chr(0b110110) + chr(0b101011 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(54) + '\061', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100111 + 0o12) + chr(52) + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(1695 - 1645) + '\x30', 65121 - 65113), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100101 + 0o21) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\x31' + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(0b1001011 + 0o44) + chr(0b110011) + chr(0b100101 + 0o20) + chr(1228 - 1179), 0b1000), nzTpIcepk0o8(chr(48) + chr(7018 - 6907) + chr(0b110001) + chr(0b1110 + 0o47) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(55) + chr(0b1011 + 0o53), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(51) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10011 + 0o37) + chr(0b110110) + chr(1564 - 1512), 0b1000), nzTpIcepk0o8('\060' + chr(3449 - 3338) + chr(55) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11819 - 11708) + chr(1084 - 1033) + chr(1751 - 1703), ord("\x08")), nzTpIcepk0o8('\060' + chr(10290 - 10179) + chr(0b110001) + chr(49) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(673 - 622) + chr(0b110 + 0o52) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110001) + '\x36', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110101) + chr(2529 - 2478), ord("\x08")), nzTpIcepk0o8(chr(1684 - 1636) + chr(0b1101111) + '\x35' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1006 - 958) + '\x6f' + chr(49) + chr(1064 - 1011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(0b101001 + 0o12) + chr(2667 - 2612) + chr(0b10100 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(2047 - 1999) + '\157' + '\064' + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(340 - 229) + chr(475 - 422) + chr(0b11010 + 0o30), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + '\x36' + chr(532 - 484), 0b1000), nzTpIcepk0o8(chr(1271 - 1223) + '\x6f' + '\063' + chr(0b1 + 0o57) + '\063', 8), nzTpIcepk0o8(chr(1837 - 1789) + chr(111) + chr(50) + chr(0b110010) + chr(0b110100), 35149 - 35141), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\061' + chr(55) + '\061', 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1010011 + 0o34) + '\061' + chr(1080 - 1025) + chr(54), 25120 - 25112)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(1868 - 1757) + chr(1361 - 1308) + chr(0b110000), 27437 - 27429)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b':'), chr(100) + '\x65' + chr(0b1011100 + 0o7) + chr(0b1101111) + chr(9418 - 9318) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def X3OqjwXXClZ4(hXMPsSrOQzbh, jG5KU4UUGnk5, iRcFmb17G7aY): if iRcFmb17G7aY in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'}H\xaa\x08\xef\xdd\x1d\x8a\x95\xdd\xb8\xf6'), chr(0b1010100 + 0o20) + '\145' + chr(6892 - 6793) + '\157' + chr(0b101111 + 0o65) + '\145')(chr(0b1101100 + 0o11) + chr(116) + '\146' + chr(0b101101) + chr(0b111000))) and roI3spqORKae(hXMPsSrOQzbh._consumers[iRcFmb17G7aY].channel, roI3spqORKae(ES5oEprVxulp(b'QP\xd6[\xf9\xfbn\xdb\x87\xab\xe7\xc1'), chr(8333 - 8233) + chr(101) + chr(0b100011 + 0o100) + chr(111) + '\144' + '\x65')('\165' + '\164' + '\x66' + '\055' + chr(0b111000))): Fz9tLfvnh2vf = aHARQoLUwjFz(tag=hXMPsSrOQzbh._consumers[iRcFmb17G7aY].A0gVABhHjc3L, queue=iRcFmb17G7aY, callback=jG5KU4UUGnk5, channel=hXMPsSrOQzbh._consumers[iRcFmb17G7aY].qiE6ZboUDe50) hXMPsSrOQzbh.iv39oDB3x3mc[iRcFmb17G7aY] = Fz9tLfvnh2vf roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'f[\xedD\xf2\xf7\t\xd8\x81\x9b\xb0'), chr(1747 - 1647) + '\x65' + '\143' + '\x6f' + '\x64' + chr(101))(chr(117) + '\x74' + chr(0b101101 + 0o71) + chr(804 - 759) + chr(0b111000)))(Fz9tLfvnh2vf) qiE6ZboUDe50 = (yield hXMPsSrOQzbh._allocate_channel()) Fz9tLfvnh2vf = aHARQoLUwjFz(tag=N9zlRy29S1SS(m4Y3vm7KKv8P.uuid4()), queue=iRcFmb17G7aY, callback=jG5KU4UUGnk5, channel=qiE6ZboUDe50) hXMPsSrOQzbh.iv39oDB3x3mc[iRcFmb17G7aY] = Fz9tLfvnh2vf if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b']x\xadv\xb0\xdbl\x8e\x9d\x87\x87\xf6'), '\x64' + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1011001 + 0o33) + chr(102) + chr(0b100101 + 0o10) + '\070')): yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'f[\xeaD\xed\xfc\x0f\xcb\x82\x8a\xa0\xf6\x1f_\x02'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')('\x75' + chr(0b1101111 + 0o5) + '\x66' + chr(0b101100 + 0o1) + chr(56)))() roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'f[\xedD\xf2\xf7\t\xd8\x81\x9b\xb0'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(0b101 + 0o50) + '\070'))(Fz9tLfvnh2vf) (vmFhzSM1J84b, zIqcgNgQ9U6F) = (yield Fz9tLfvnh2vf.channel.basic_consume(queue=Fz9tLfvnh2vf.iRcFmb17G7aY, consumer_tag=Fz9tLfvnh2vf.A0gVABhHjc3L)) VTs7CTDkBstx = hXMPsSrOQzbh.nah1yE9Swp1G(vmFhzSM1J84b, Fz9tLfvnh2vf) roI3spqORKae(VTs7CTDkBstx, roI3spqORKae(ES5oEprVxulp(b'uZ\xfdt\xf2\xeb=\xd8\x8e\x85'), chr(0b1100100) + chr(0b1001 + 0o134) + '\143' + chr(111) + chr(2317 - 2217) + '\x65')(chr(117) + '\164' + chr(0b1100000 + 0o6) + '\x2d' + chr(56)))(lambda _R8IKF5IwAfX: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'gR\xfdK\xe2\xd1)\xdc\xd5\xa9\xe4\xc6'), '\x64' + chr(0b1100101) + chr(0b110111 + 0o54) + '\x6f' + chr(100) + chr(101))(chr(0b1000 + 0o155) + '\x74' + chr(102) + chr(0b10001 + 0o34) + chr(0b111000))), roI3spqORKae(ES5oEprVxulp(b'KL\xfcP\xe4\xb99\xd8\x84\x82\xb0\xf1V^\x0bpW!\x87\x1cK\xb3\xd1M84\xa03'), chr(1239 - 1139) + chr(101) + '\143' + chr(0b1100000 + 0o17) + chr(0b1100100) + chr(101))('\x75' + '\x74' + '\x66' + chr(164 - 119) + '\070'), c=Fz9tLfvnh2vf, logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'ZX\xeax\xee\xdei\xc3\x8f\x9f\xe2\xa5'), chr(0b101101 + 0o67) + chr(1716 - 1615) + chr(571 - 472) + chr(111) + chr(100) + '\x65')(chr(0b1101000 + 0o15) + '\x74' + chr(102) + '\x2d' + chr(0b111000)))) roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'gR\xfdK\xe2\xd1)\xdc\xd5\xa9\xe4\xc6'), chr(0b1100100) + chr(0b10111 + 0o116) + chr(3849 - 3750) + chr(0b1 + 0o156) + chr(2245 - 2145) + chr(101))('\165' + '\x74' + chr(0b1001011 + 0o33) + chr(0b1001 + 0o44) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'GK\xfaR\xe5\xea,\xdf\x98\x82\xb9\xecVC\x007]=\x9d\nL\xbb\xd0\x1fY\x02\x92\x1e\xcbMb\x93U_t\x95\xb1\xb4\x02\x1di'), chr(8093 - 7993) + '\145' + chr(0b1100011) + chr(111) + chr(0b111111 + 0o45) + '\x65')(chr(2945 - 2828) + '\164' + '\146' + chr(45) + chr(1564 - 1508)), c=Fz9tLfvnh2vf) roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'f[\xedD\xf2\xf7\t\xd8\x81\x9b\xb0'), '\x64' + '\x65' + '\143' + '\x6f' + '\x64' + chr(0b10101 + 0o120))('\x75' + chr(13084 - 12968) + chr(0b1100110) + chr(45) + chr(0b111000)))(Fz9tLfvnh2vf)
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocol.cancel
def cancel(self, queue): """ Cancel the consumer for a queue. Args: queue (str): The name of the queue the consumer is subscribed to. Returns: defer.Deferred: A Deferred that fires when the consumer is canceled, or None if the consumer was already canceled. Wrap the call in :func:`.defer.maybeDeferred` to always receive a Deferred. """ try: consumer = self._consumers[queue] yield consumer.channel.basic_cancel(consumer_tag=consumer.tag) except pika.exceptions.AMQPChannelError: # Consumers are tied to channels, so if this channel is dead the # consumer should already be canceled (and we can't get to it anyway) pass except KeyError: defer.returnValue(None) try: yield consumer.channel.close() except pika.exceptions.AMQPChannelError: pass del self._consumers[queue]
python
def cancel(self, queue): """ Cancel the consumer for a queue. Args: queue (str): The name of the queue the consumer is subscribed to. Returns: defer.Deferred: A Deferred that fires when the consumer is canceled, or None if the consumer was already canceled. Wrap the call in :func:`.defer.maybeDeferred` to always receive a Deferred. """ try: consumer = self._consumers[queue] yield consumer.channel.basic_cancel(consumer_tag=consumer.tag) except pika.exceptions.AMQPChannelError: # Consumers are tied to channels, so if this channel is dead the # consumer should already be canceled (and we can't get to it anyway) pass except KeyError: defer.returnValue(None) try: yield consumer.channel.close() except pika.exceptions.AMQPChannelError: pass del self._consumers[queue]
[ "def", "cancel", "(", "self", ",", "queue", ")", ":", "try", ":", "consumer", "=", "self", ".", "_consumers", "[", "queue", "]", "yield", "consumer", ".", "channel", ".", "basic_cancel", "(", "consumer_tag", "=", "consumer", ".", "tag", ")", "except", "pika", ".", "exceptions", ".", "AMQPChannelError", ":", "# Consumers are tied to channels, so if this channel is dead the", "# consumer should already be canceled (and we can't get to it anyway)", "pass", "except", "KeyError", ":", "defer", ".", "returnValue", "(", "None", ")", "try", ":", "yield", "consumer", ".", "channel", ".", "close", "(", ")", "except", "pika", ".", "exceptions", ".", "AMQPChannelError", ":", "pass", "del", "self", ".", "_consumers", "[", "queue", "]" ]
Cancel the consumer for a queue. Args: queue (str): The name of the queue the consumer is subscribed to. Returns: defer.Deferred: A Deferred that fires when the consumer is canceled, or None if the consumer was already canceled. Wrap the call in :func:`.defer.maybeDeferred` to always receive a Deferred.
[ "Cancel", "the", "consumer", "for", "a", "queue", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L855-L882
train
Cancel the consumer for a queue.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,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V9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b111010 + 0o65) + chr(0b110011) + chr(0b110111) + chr(0b1000 + 0o53), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52) + '\x33', 1486 - 1478), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b11110 + 0o30) + chr(0b11010 + 0o27), 0o10), nzTpIcepk0o8(chr(2239 - 2191) + chr(0b110000 + 0o77) + chr(51) + chr(0b110101) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(11398 - 11287) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(52) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + '\x31' + chr(1893 - 1839) + chr(0b100111 + 0o13), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\067' + chr(2723 - 2668), 0o10), nzTpIcepk0o8(chr(1101 - 1053) + chr(0b100001 + 0o116) + chr(51) + chr(55) + chr(0b10111 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(7479 - 7368) + chr(2195 - 2146) + chr(0b11 + 0o62) + '\061', 0b1000), nzTpIcepk0o8('\060' + chr(0b1011110 + 0o21) + chr(376 - 322), 48366 - 48358), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(50) + chr(0b1010 + 0o53) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\065' + '\060', ord("\x08")), nzTpIcepk0o8(chr(1196 - 1148) + chr(111) + chr(51) + chr(131 - 82) + chr(48), 52636 - 52628), nzTpIcepk0o8('\x30' + chr(0b1001110 + 0o41) + chr(0b110001 + 0o2) + chr(111 - 60) + chr(2648 - 2594), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101101 + 0o2) + chr(456 - 405) + chr(1610 - 1560) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b1101 + 0o50), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\066' + chr(0b100100 + 0o15), 8), nzTpIcepk0o8('\060' + chr(9928 - 9817) + '\x31' + '\062' + chr(55), 28275 - 28267), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101000 + 0o13) + chr(1099 - 1046) + '\x36', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(361 - 310) + chr(0b1001 + 0o54) + chr(1031 - 979), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(10081 - 9970) + '\x31' + '\062' + '\x30', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(50) + chr(2402 - 2349), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1779 - 1728) + chr(52) + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(155 - 44) + chr(0b1001 + 0o56) + chr(0b101001 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(0b110010) + chr(0b110001) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7111 - 7000) + chr(283 - 232), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + chr(50) + chr(51), 3042 - 3034), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(50) + '\066', 1815 - 1807), nzTpIcepk0o8('\x30' + '\157' + chr(238 - 184) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11100 + 0o123) + chr(0b100110 + 0o13) + chr(320 - 272) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1953 - 1900), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b10100 + 0o35) + chr(0b110010 + 0o1) + chr(2222 - 2170), 48500 - 48492), nzTpIcepk0o8(chr(1929 - 1881) + chr(5695 - 5584) + chr(136 - 87) + chr(0b10010 + 0o37) + chr(0b100010 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(53) + chr(48), 0o10), nzTpIcepk0o8(chr(827 - 779) + '\x6f' + chr(0b10001 + 0o40) + chr(55) + chr(50), 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + '\061' + chr(0b101000 + 0o12) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(1755 - 1707), 56262 - 56254), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x37' + chr(48), 1783 - 1775), nzTpIcepk0o8(chr(48) + '\x6f' + chr(184 - 134) + chr(1985 - 1934) + '\060', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + '\x35' + chr(0b10111 + 0o31), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd5'), '\x64' + chr(0b1100101) + chr(4247 - 4148) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(9393 - 9276) + chr(0b1110100) + chr(102) + '\055' + chr(2255 - 2199)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XeoIuri11m65(hXMPsSrOQzbh, iRcFmb17G7aY): try: Fz9tLfvnh2vf = hXMPsSrOQzbh.iv39oDB3x3mc[iRcFmb17G7aY] yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'\x99B\x02\x87c\xff\x11\xde\x90\nc\xc2'), chr(0b101010 + 0o72) + '\x65' + chr(99) + chr(7975 - 7864) + '\x64' + '\x65')(chr(7699 - 7582) + '\164' + chr(114 - 12) + chr(0b101101) + '\x38'))(consumer_tag=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xba\x13\x16\xb8A\xe2\x1a\xf7\x94\n5\xe2'), chr(3451 - 3351) + chr(0b1100101) + '\143' + chr(0b1101111) + '\144' + '\145')('\165' + chr(6651 - 6535) + '\x66' + chr(45) + '\x38'))) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xban \xbeC\xc8\x13\xd1\x90\x0cj\xeb\x9a\xba\xb1\xa1'), '\144' + chr(6007 - 5906) + '\143' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070')): pass except knUxyjfq07F9: roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\x89F\x05\x9br\xce$\xde\x92\x1cc'), '\144' + chr(3695 - 3594) + chr(9228 - 9129) + '\157' + chr(100) + chr(101))('\x75' + chr(0b1010011 + 0o41) + chr(102) + '\055' + chr(1859 - 1803)))(None) try: yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'\xa1F\x00\xd9C\xc3\x14\x86\xab\r>\xc4'), chr(100) + chr(0b10000 + 0o125) + '\143' + chr(0b1001001 + 0o46) + chr(4813 - 4713) + '\145')(chr(117) + chr(12940 - 12824) + chr(2637 - 2535) + chr(0b11010 + 0o23) + chr(3122 - 3066)))() except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xban \xbeC\xc8\x13\xd1\x90\x0cj\xeb\x9a\xba\xb1\xa1'), chr(0b1100100) + chr(0b1 + 0o144) + chr(0b1000001 + 0o42) + '\x6f' + '\x64' + '\145')(chr(0b11001 + 0o134) + chr(0b1000100 + 0o60) + chr(0b1100110) + chr(45) + '\x38')): pass del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x92UB\xd7o\xe40\x8c\x86Zk\xcd'), '\144' + '\x65' + chr(0b1100011) + chr(6263 - 6152) + chr(2162 - 2062) + chr(7701 - 7600))('\165' + '\x74' + chr(102) + chr(733 - 688) + '\x38'))[iRcFmb17G7aY]
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocol.resumeProducing
def resumeProducing(self): """ Starts or resumes the retrieval of messages from the server queue. This method starts receiving messages from the server, they will be passed to the consumer callback. .. note:: This is called automatically when :meth:`.consume` is called, so users should not need to call this unless :meth:`.pauseProducing` has been called. Returns: defer.Deferred: fired when the production is ready to start """ # Start consuming self._running = True for consumer in self._consumers.values(): queue_object, _ = yield consumer.channel.basic_consume( queue=consumer.queue, consumer_tag=consumer.tag ) deferred = self._read(queue_object, consumer) deferred.addErrback( lambda f: _legacy_twisted_log.msg, "_read failed on consumer {c}", c=consumer, logLevel=logging.ERROR, ) _legacy_twisted_log.msg("AMQP connection successfully established")
python
def resumeProducing(self): """ Starts or resumes the retrieval of messages from the server queue. This method starts receiving messages from the server, they will be passed to the consumer callback. .. note:: This is called automatically when :meth:`.consume` is called, so users should not need to call this unless :meth:`.pauseProducing` has been called. Returns: defer.Deferred: fired when the production is ready to start """ # Start consuming self._running = True for consumer in self._consumers.values(): queue_object, _ = yield consumer.channel.basic_consume( queue=consumer.queue, consumer_tag=consumer.tag ) deferred = self._read(queue_object, consumer) deferred.addErrback( lambda f: _legacy_twisted_log.msg, "_read failed on consumer {c}", c=consumer, logLevel=logging.ERROR, ) _legacy_twisted_log.msg("AMQP connection successfully established")
[ "def", "resumeProducing", "(", "self", ")", ":", "# Start consuming", "self", ".", "_running", "=", "True", "for", "consumer", "in", "self", ".", "_consumers", ".", "values", "(", ")", ":", "queue_object", ",", "_", "=", "yield", "consumer", ".", "channel", ".", "basic_consume", "(", "queue", "=", "consumer", ".", "queue", ",", "consumer_tag", "=", "consumer", ".", "tag", ")", "deferred", "=", "self", ".", "_read", "(", "queue_object", ",", "consumer", ")", "deferred", ".", "addErrback", "(", "lambda", "f", ":", "_legacy_twisted_log", ".", "msg", ",", "\"_read failed on consumer {c}\"", ",", "c", "=", "consumer", ",", "logLevel", "=", "logging", ".", "ERROR", ",", ")", "_legacy_twisted_log", ".", "msg", "(", "\"AMQP connection successfully established\"", ")" ]
Starts or resumes the retrieval of messages from the server queue. This method starts receiving messages from the server, they will be passed to the consumer callback. .. note:: This is called automatically when :meth:`.consume` is called, so users should not need to call this unless :meth:`.pauseProducing` has been called. Returns: defer.Deferred: fired when the production is ready to start
[ "Starts", "or", "resumes", "the", "retrieval", "of", "messages", "from", "the", "server", "queue", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L885-L912
train
Starts or resumes the retrieval of messages from the server queue.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,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_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b100000 + 0o24) + chr(0b1110 + 0o46), 63088 - 63080), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(52) + chr(49), 0o10), nzTpIcepk0o8(chr(1365 - 1317) + chr(0b1101111) + chr(0b100100 + 0o16) + chr(55) + chr(739 - 691), 27496 - 27488), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(52) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b10110 + 0o33) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(11188 - 11077) + chr(0b110000 + 0o2) + chr(52) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\x33' + '\062' + chr(0b101110 + 0o10), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\x33' + chr(0b10 + 0o63), 34247 - 34239), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1100 + 0o46) + chr(1124 - 1070) + '\x35', 9310 - 9302), nzTpIcepk0o8(chr(48) + '\x6f' + '\066' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(51) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(0b100001 + 0o17) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\060' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(918 - 870) + chr(0b1101111) + '\061' + '\x33' + chr(52 - 4), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100010 + 0o15) + chr(0b110000 + 0o1) + chr(0b110010) + '\x32', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x37' + chr(49), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b0 + 0o63) + chr(0b1101 + 0o45), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10423 - 10312) + chr(49) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(2323 - 2270) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\x32' + '\061' + chr(49), 0b1000), nzTpIcepk0o8(chr(857 - 809) + chr(0b1101111) + '\066' + chr(0b110001), 57222 - 57214), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(11486 - 11375) + '\063' + chr(844 - 791) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101000 + 0o11) + '\x36' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(2352 - 2241) + '\063' + chr(0b100011 + 0o23) + '\x33', 0o10), nzTpIcepk0o8(chr(2276 - 2228) + chr(1715 - 1604) + chr(50) + chr(50) + '\061', 47325 - 47317), nzTpIcepk0o8(chr(1780 - 1732) + chr(111) + chr(846 - 797) + chr(53) + chr(2086 - 2038), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\064', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11100 + 0o26) + chr(0b110000) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(7185 - 7074) + chr(0b110010) + chr(0b101011 + 0o12) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1111 + 0o44) + '\063' + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(556 - 506) + chr(0b10 + 0o57) + chr(1914 - 1863), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(54) + chr(0b100110 + 0o17), 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(812 - 762) + chr(2142 - 2088) + chr(489 - 437), 41803 - 41795), nzTpIcepk0o8(chr(893 - 845) + chr(7271 - 7160) + '\x31' + chr(0b110111) + '\066', 49385 - 49377), nzTpIcepk0o8(chr(1979 - 1931) + '\157' + '\x33' + chr(2242 - 2188) + '\064', 14180 - 14172), nzTpIcepk0o8(chr(48) + chr(111) + chr(2223 - 2175), 42128 - 42120), nzTpIcepk0o8(chr(0b110000) + chr(0b1110 + 0o141) + chr(0b110011) + chr(0b1100 + 0o50) + '\x37', 628 - 620), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + '\063' + chr(49) + chr(0b10111 + 0o40), 52539 - 52531), nzTpIcepk0o8(chr(48) + chr(0b10000 + 0o137) + chr(0b10000 + 0o42) + chr(49) + chr(55), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(833 - 782) + chr(54) + '\065', 37255 - 37247)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(9121 - 9010) + chr(1158 - 1105) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(100) + chr(0b100000 + 0o105) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1001011 + 0o52) + chr(1151 - 1035) + chr(102) + chr(0b101101) + chr(0b10100 + 0o44)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def H94rLtpZ74dd(hXMPsSrOQzbh): hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(48) + chr(0b1001001 + 0o46) + chr(0b110001), ord("\x08")) for Fz9tLfvnh2vf in roI3spqORKae(hXMPsSrOQzbh._consumers, roI3spqORKae(ES5oEprVxulp(b'\xa7\x12\xd7B\xd4\xef\x9ek\xcd\r\x8b\xfd'), '\x64' + chr(0b110011 + 0o62) + chr(9649 - 9550) + chr(2752 - 2641) + '\144' + chr(0b101000 + 0o75))(chr(0b1110101) + chr(116) + chr(7255 - 7153) + '\055' + chr(0b110000 + 0o10)))(): (vmFhzSM1J84b, zIqcgNgQ9U6F) = (yield Fz9tLfvnh2vf.channel.basic_consume(queue=Fz9tLfvnh2vf.iRcFmb17G7aY, consumer_tag=Fz9tLfvnh2vf.A0gVABhHjc3L)) VTs7CTDkBstx = hXMPsSrOQzbh.nah1yE9Swp1G(vmFhzSM1J84b, Fz9tLfvnh2vf) roI3spqORKae(VTs7CTDkBstx, roI3spqORKae(ES5oEprVxulp(b'\x85\x05\xdcc\xfc\xd7\xb4<\xd6_'), chr(7378 - 7278) + chr(2138 - 2037) + '\x63' + chr(0b1010110 + 0o31) + chr(0b1100100) + chr(1654 - 1553))(chr(0b1110101) + chr(3206 - 3090) + chr(102) + chr(45) + '\x38'))(lambda _R8IKF5IwAfX: roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'\x97\r\xdc\\\xec\xed\xa08\x8ds\xee\xd6'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1010101 + 0o40) + chr(116) + chr(102) + chr(247 - 202) + '\070')), roI3spqORKae(ES5oEprVxulp(b'\xbb\x13\xddG\xea\x85\xb0<\xdcX\xba\xe1b7<\x199f\xc2\xfaD\x84\x12\x81\xb1\x13w\xfa'), chr(4273 - 4173) + '\x65' + chr(7677 - 7578) + chr(0b1101111) + chr(0b1000100 + 0o40) + '\145')(chr(0b10111 + 0o136) + '\x74' + '\146' + chr(270 - 225) + chr(56)), c=Fz9tLfvnh2vf, logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b"\xaa\x07\xcbo\xe0\xe2\xe0'\xd7E\xe8\xb5"), chr(8828 - 8728) + '\145' + chr(0b1100011) + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(13176 - 13060) + chr(0b1100110) + '\x2d' + '\x38'))) roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'\x97\r\xdc\\\xec\xed\xa08\x8ds\xee\xd6'), chr(100) + chr(101) + chr(4821 - 4722) + chr(11259 - 11148) + '\x64' + chr(8994 - 8893))(chr(0b1110101) + '\x74' + '\x66' + '\x2d' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xa5,\xe9v\xae\xc6\xb93\xdbQ\xbc\xf1+7<\x19)|\xcf\xeaT\x9a\x04\x95\xe4\x04x\xfe\x8a\xbf\xf8\xc1\xd5\x1c\x98i\x94\xa7\xea\x91'), chr(0b1100100) + chr(0b1000111 + 0o36) + '\x63' + '\x6f' + '\144' + chr(0b1100101))(chr(3293 - 3176) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38'))
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocol.pauseProducing
def pauseProducing(self): """ Pause the reception of messages by canceling all existing consumers. This does not disconnect from the server. Message reception can be resumed with :meth:`resumeProducing`. Returns: Deferred: fired when the production is paused. """ if not self._running: return # Exit the read loop and cancel the consumer on the server. self._running = False for consumer in self._consumers.values(): yield consumer.channel.basic_cancel(consumer_tag=consumer.tag) _legacy_twisted_log.msg("Paused retrieval of messages for the server queue")
python
def pauseProducing(self): """ Pause the reception of messages by canceling all existing consumers. This does not disconnect from the server. Message reception can be resumed with :meth:`resumeProducing`. Returns: Deferred: fired when the production is paused. """ if not self._running: return # Exit the read loop and cancel the consumer on the server. self._running = False for consumer in self._consumers.values(): yield consumer.channel.basic_cancel(consumer_tag=consumer.tag) _legacy_twisted_log.msg("Paused retrieval of messages for the server queue")
[ "def", "pauseProducing", "(", "self", ")", ":", "if", "not", "self", ".", "_running", ":", "return", "# Exit the read loop and cancel the consumer on the server.", "self", ".", "_running", "=", "False", "for", "consumer", "in", "self", ".", "_consumers", ".", "values", "(", ")", ":", "yield", "consumer", ".", "channel", ".", "basic_cancel", "(", "consumer_tag", "=", "consumer", ".", "tag", ")", "_legacy_twisted_log", ".", "msg", "(", "\"Paused retrieval of messages for the server queue\"", ")" ]
Pause the reception of messages by canceling all existing consumers. This does not disconnect from the server. Message reception can be resumed with :meth:`resumeProducing`. Returns: Deferred: fired when the production is paused.
[ "Pause", "the", "reception", "of", "messages", "by", "canceling", "all", "existing", "consumers", ".", "This", "does", "not", "disconnect", "from", "the", "server", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L915-L931
train
Pause the consumer and cancel all consumers that are currently being processed.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m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dKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(6363 - 6252) + chr(0b11000 + 0o33) + chr(0b1 + 0o57) + chr(1136 - 1085), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\x37' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11100 + 0o123) + '\062' + '\060' + chr(0b10000 + 0o40), 32179 - 32171), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1677 - 1626) + chr(0b1010 + 0o54) + '\060', 0o10), nzTpIcepk0o8('\060' + chr(11442 - 11331) + '\x31' + '\x31' + chr(0b101100 + 0o13), 36220 - 36212), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110100) + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\063' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b110001 + 0o3), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + chr(0b110010) + chr(51) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4159 - 4048) + '\x33' + chr(0b1011 + 0o53), 28758 - 28750), nzTpIcepk0o8(chr(48) + chr(7978 - 7867) + '\061' + chr(2384 - 2334) + '\x31', 21695 - 21687), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065' + '\066', 0b1000), nzTpIcepk0o8(chr(770 - 722) + chr(0b1101111) + chr(0b11110 + 0o25) + '\066' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(2197 - 2147) + chr(450 - 401), 8), nzTpIcepk0o8(chr(90 - 42) + chr(3518 - 3407) + chr(50) + chr(198 - 148) + '\063', 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(0b110001) + '\066' + chr(0b110000 + 0o1), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(1578 - 1528) + '\066' + chr(0b101101 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1363 - 1312) + chr(0b110100) + '\061', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1010 + 0o47) + '\062' + chr(164 - 109), 0o10), nzTpIcepk0o8(chr(48) + chr(1694 - 1583) + chr(1736 - 1683) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101010 + 0o11) + '\x35' + '\067', 22360 - 22352), nzTpIcepk0o8('\x30' + chr(7249 - 7138) + chr(0b1 + 0o61) + chr(0b110010) + chr(0b101101 + 0o5), 42404 - 42396), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1100001 + 0o16) + chr(51) + '\x35' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1476 - 1428) + chr(111) + chr(49) + chr(0b110001) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + '\x33' + '\064' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10111 + 0o34) + chr(0b100110 + 0o20) + chr(0b110100 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110 + 0o54) + chr(1615 - 1561) + chr(0b10011 + 0o44), 40862 - 40854), nzTpIcepk0o8('\060' + chr(111) + chr(889 - 838) + chr(0b100110 + 0o16) + chr(0b10000 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(1380 - 1332) + '\157' + chr(53) + chr(53), 8), nzTpIcepk0o8(chr(926 - 878) + '\157' + chr(50) + '\x36' + '\065', 23525 - 23517), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + '\x33' + chr(762 - 714), 43225 - 43217), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b110011) + chr(0b10101 + 0o40) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100101 + 0o15) + chr(52), 8), nzTpIcepk0o8('\x30' + chr(0b110001 + 0o76) + chr(747 - 696) + '\066', 8), nzTpIcepk0o8(chr(0b110000) + chr(1107 - 996) + '\x32' + chr(0b11001 + 0o32) + chr(0b11001 + 0o35), 0b1000), nzTpIcepk0o8(chr(757 - 709) + chr(0b101111 + 0o100) + chr(641 - 588) + '\060', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b100011 + 0o16) + chr(0b100101 + 0o16) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b11111 + 0o23) + chr(50), 50251 - 50243), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + '\062' + chr(0b100101 + 0o20) + chr(0b110001 + 0o1), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(803 - 752) + '\060', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110101) + chr(1287 - 1239), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xed'), '\144' + chr(366 - 265) + '\143' + chr(0b1000111 + 0o50) + chr(100) + chr(101))(chr(117) + chr(3838 - 3722) + chr(102) + chr(45) + chr(0b100110 + 0o22)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def byhpgUIit2er(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x8a\xfc\xb4\xb7\x7f"\xef#\xe9w\x03M'), '\x64' + '\145' + chr(0b1010101 + 0o16) + chr(11212 - 11101) + chr(0b100100 + 0o100) + chr(9998 - 9897))('\165' + chr(11344 - 11228) + '\x66' + chr(45) + chr(0b111000))): return hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(0b110000) + chr(0b101001 + 0o106) + '\x30', 0o10) for Fz9tLfvnh2vf in roI3spqORKae(hXMPsSrOQzbh._consumers, roI3spqORKae(ES5oEprVxulp(b'\x80\xc9\xef\x94\x15*\x94"\xe1\'\x05V'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1001 + 0o146) + '\144' + chr(9674 - 9573))('\x75' + '\164' + chr(102) + chr(45) + chr(2731 - 2675)))(): yield roI3spqORKae(Fz9tLfvnh2vf.channel, roI3spqORKae(ES5oEprVxulp(b'\xa1\xdb\xf3\x99,?\xbfu\xf7}4B'), chr(0b1100100) + chr(0b1001010 + 0o33) + '\x63' + chr(11216 - 11105) + '\144' + chr(226 - 125))(chr(0b1100 + 0o151) + '\x74' + '\146' + chr(0b101100 + 0o1) + '\x38'))(consumer_tag=roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\x82\x8a\xe7\xa6\x0e"\xb4\\\xf3}bb'), chr(5969 - 5869) + chr(3242 - 3141) + '\143' + '\157' + '\x64' + chr(8792 - 8691))(chr(0b111110 + 0o67) + chr(0b1001001 + 0o53) + chr(0b1100110) + chr(0b101101) + '\070'))) roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'\xb0\xd6\xe4\x8a-(\xaaq\xa1Y`}'), chr(2625 - 2525) + '\x65' + chr(0b1100011) + '\x6f' + chr(2141 - 2041) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b"\x93\xdb\xf5\x83*\x04\xfcf\xfcj#G\x97'\xf2\x1d\x90\x8e1\r\x82\xf7\x99?\x85\x90\xd2\x94\r\xd3w\x9e4j\xf6M\x7f!\xcf\xaa\xb5\xdf\xf2\xd0>\x15\xb9a\xfc"), '\144' + chr(0b10011 + 0o122) + chr(0b1100011) + chr(4416 - 4305) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1101101 + 0o7) + '\146' + chr(45) + chr(56)))
fedora-infra/fedora-messaging
fedora_messaging/twisted/protocol.py
FedoraMessagingProtocol.stopProducing
def stopProducing(self): """ Stop producing messages and disconnect from the server. Returns: Deferred: fired when the production is stopped. """ _legacy_twisted_log.msg("Disconnecting from the AMQP broker") yield self.pauseProducing() yield self.close() self._consumers = {} self._channel = None
python
def stopProducing(self): """ Stop producing messages and disconnect from the server. Returns: Deferred: fired when the production is stopped. """ _legacy_twisted_log.msg("Disconnecting from the AMQP broker") yield self.pauseProducing() yield self.close() self._consumers = {} self._channel = None
[ "def", "stopProducing", "(", "self", ")", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Disconnecting from the AMQP broker\"", ")", "yield", "self", ".", "pauseProducing", "(", ")", "yield", "self", ".", "close", "(", ")", "self", ".", "_consumers", "=", "{", "}", "self", ".", "_channel", "=", "None" ]
Stop producing messages and disconnect from the server. Returns: Deferred: fired when the production is stopped.
[ "Stop", "producing", "messages", "and", "disconnect", "from", "the", "server", ".", "Returns", ":", "Deferred", ":", "fired", "when", "the", "production", "is", "stopped", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/protocol.py#L934-L944
train
Stop producing messages and disconnect from the server.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alq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6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(52) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + chr(0b100101 + 0o16) + chr(414 - 362) + '\x30', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x37' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b100100 + 0o17) + chr(0b110010), 42006 - 41998), nzTpIcepk0o8(chr(105 - 57) + chr(11756 - 11645) + '\x31' + chr(0b101001 + 0o15), 0o10), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + chr(0b101001 + 0o12) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110000) + '\060', 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(0b11010 + 0o31) + '\x30' + '\061', 0o10), nzTpIcepk0o8(chr(73 - 25) + '\x6f' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\x33' + chr(0b101110 + 0o10) + chr(2438 - 2383), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1261 - 1210) + chr(0b111 + 0o57) + chr(2306 - 2255), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1272 - 1223) + chr(0b110010) + chr(0b110100), 53897 - 53889), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(49) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4456 - 4345) + '\x33' + chr(451 - 400) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + '\x34' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(50) + '\061' + '\062', ord("\x08")), nzTpIcepk0o8(chr(1266 - 1218) + '\157' + chr(0b11 + 0o56) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(655 - 602) + chr(1625 - 1575), 55063 - 55055), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110111) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4722 - 4611) + chr(51) + '\066' + '\x30', 62470 - 62462), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110100) + chr(54), 5906 - 5898), nzTpIcepk0o8(chr(2238 - 2190) + '\x6f' + '\063' + chr(1969 - 1918) + chr(0b110000), 62992 - 62984), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1001000 + 0o47) + chr(51) + chr(0b100010 + 0o16) + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b110111) + chr(1043 - 995), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b111 + 0o51) + chr(0b100101 + 0o20), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + '\x32' + '\x31' + chr(1462 - 1407), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b101110 + 0o4) + chr(1631 - 1577) + chr(0b11 + 0o55), 0o10), nzTpIcepk0o8(chr(2012 - 1964) + '\x6f' + '\x33' + chr(49) + chr(49), 3426 - 3418), nzTpIcepk0o8(chr(1282 - 1234) + '\x6f' + '\065' + chr(0b100110 + 0o20), 0b1000), nzTpIcepk0o8(chr(48) + chr(11595 - 11484) + chr(0b110101) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1001 + 0o50) + chr(0b11011 + 0o30), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(7333 - 7222) + chr(2143 - 2092) + chr(52) + '\x37', 0o10), nzTpIcepk0o8(chr(1163 - 1115) + chr(0b1010011 + 0o34) + chr(0b110101) + '\x30', 19827 - 19819), nzTpIcepk0o8('\060' + '\x6f' + '\064' + '\065', 52912 - 52904), nzTpIcepk0o8(chr(1142 - 1094) + chr(111) + chr(0b11010 + 0o31) + chr(0b110110) + chr(159 - 108), 8), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + chr(1566 - 1516) + '\x34' + '\x33', 0o10), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + '\x32', 8), nzTpIcepk0o8('\x30' + chr(0b1010100 + 0o33) + '\063' + chr(2105 - 2057) + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(48) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9456 - 9345) + '\063' + chr(2465 - 2414) + chr(0b110110), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110101) + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'K'), chr(0b111111 + 0o45) + chr(7975 - 7874) + chr(0b1100011) + chr(111) + chr(0b1000011 + 0o41) + chr(0b1100101))('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def mG9Qa9n31KFc(hXMPsSrOQzbh): roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'\x16\x8c\x19\xa0lU\xb6\xa4:\xb0\xc2\x07'), chr(0b1010101 + 0o17) + '\x65' + chr(0b1011101 + 0o6) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'!\x89\x0e\xb9as\xae\xa4a\x83\x9a:+\xf9\x82\xf8c\xc7\x1d\x84\x0e\xbd\xe29\xc8\xde\xe0\xe9L^d\x8cMW'), chr(1406 - 1306) + chr(2969 - 2868) + chr(0b101001 + 0o72) + chr(2655 - 2544) + chr(0b1010001 + 0o23) + chr(101))(chr(0b101101 + 0o110) + '\x74' + chr(0b1100100 + 0o2) + chr(45) + '\070')) yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x15\x81\x08\xa9kM\xb2\xaef\x82\x90="\xbe'), chr(1391 - 1291) + chr(0b1100101) + chr(0b1100011) + '\157' + '\144' + chr(6967 - 6866))(chr(0b1100000 + 0o25) + '\x74' + '\146' + '\055' + '\070'))() yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'?\x85\x0c\xedM~\xa6\xf8W\x93\xcb>'), chr(100) + chr(0b101111 + 0o66) + '\x63' + chr(2378 - 2267) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1000111 + 0o55) + chr(9802 - 9700) + '\055' + chr(56)))() hXMPsSrOQzbh.iv39oDB3x3mc = {} hXMPsSrOQzbh.oO1rBQeetvBW = None
fedora-infra/fedora-messaging
fedora_messaging/message.py
get_class
def get_class(schema_name): """ Retrieve the message class associated with the schema name. If no match is found, the default schema is returned and a warning is logged. Args: schema_name (six.text_type): The name of the :class:`Message` sub-class; this is typically the Python path. Returns: Message: A sub-class of :class:`Message` to create the message from. """ global _registry_loaded if not _registry_loaded: load_message_classes() try: return _schema_name_to_class[schema_name] except KeyError: _log.warning( 'The schema "%s" is not in the schema registry! Either install ' "the package with its schema definition or define a schema. " "Falling back to the default schema...", schema_name, ) return Message
python
def get_class(schema_name): """ Retrieve the message class associated with the schema name. If no match is found, the default schema is returned and a warning is logged. Args: schema_name (six.text_type): The name of the :class:`Message` sub-class; this is typically the Python path. Returns: Message: A sub-class of :class:`Message` to create the message from. """ global _registry_loaded if not _registry_loaded: load_message_classes() try: return _schema_name_to_class[schema_name] except KeyError: _log.warning( 'The schema "%s" is not in the schema registry! Either install ' "the package with its schema definition or define a schema. " "Falling back to the default schema...", schema_name, ) return Message
[ "def", "get_class", "(", "schema_name", ")", ":", "global", "_registry_loaded", "if", "not", "_registry_loaded", ":", "load_message_classes", "(", ")", "try", ":", "return", "_schema_name_to_class", "[", "schema_name", "]", "except", "KeyError", ":", "_log", ".", "warning", "(", "'The schema \"%s\" is not in the schema registry! Either install '", "\"the package with its schema definition or define a schema. \"", "\"Falling back to the default schema...\"", ",", "schema_name", ",", ")", "return", "Message" ]
Retrieve the message class associated with the schema name. If no match is found, the default schema is returned and a warning is logged. Args: schema_name (six.text_type): The name of the :class:`Message` sub-class; this is typically the Python path. Returns: Message: A sub-class of :class:`Message` to create the message from.
[ "Retrieve", "the", "message", "class", "associated", "with", "the", "schema", "name", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L74-L100
train
Returns the sub - class of the specified schema name.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,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ORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(0b100110 + 0o15) + '\060' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(0b101000 + 0o12) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(50) + chr(0b110 + 0o54) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110001 + 0o1) + chr(0b110001) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(641 - 591) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1302 - 1251) + '\x34' + chr(0b110000 + 0o4), 51888 - 51880), nzTpIcepk0o8(chr(48) + chr(7281 - 7170) + chr(0b110011) + chr(55) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b100000 + 0o24) + '\063', 53771 - 53763), nzTpIcepk0o8('\060' + chr(111) + chr(1468 - 1419) + '\x35' + chr(1285 - 1235), 0o10), nzTpIcepk0o8('\x30' + chr(12292 - 12181) + chr(270 - 221) + chr(52) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + '\063' + '\x32' + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100001 + 0o20) + chr(84 - 35) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(55) + chr(53), 0o10), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x34' + chr(0b110001 + 0o2), 0o10), nzTpIcepk0o8(chr(519 - 471) + chr(0b1010 + 0o145) + chr(0b1001 + 0o51) + '\065' + chr(2258 - 2203), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + chr(0b110001) + chr(0b110000) + chr(192 - 142), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(52) + '\063', ord("\x08")), nzTpIcepk0o8(chr(2044 - 1996) + chr(4084 - 3973) + chr(1200 - 1151) + '\060' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(899 - 851) + chr(111) + '\063' + chr(2632 - 2577) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111 + 0o0) + '\062' + chr(0b110000), 9914 - 9906), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010 + 0o0) + chr(2666 - 2612) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010000 + 0o37) + '\x31' + chr(693 - 641) + chr(0b11100 + 0o33), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b100001 + 0o116) + chr(49) + chr(1796 - 1744) + chr(50), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(11066 - 10955) + chr(0b100011 + 0o17) + chr(0b101100 + 0o6) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + '\063' + '\x33' + '\060', ord("\x08")), nzTpIcepk0o8(chr(1956 - 1908) + chr(5983 - 5872) + chr(2242 - 2193) + chr(927 - 879) + chr(0b1000 + 0o57), 52397 - 52389), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b110111 + 0o70) + chr(0b10 + 0o57) + '\064' + chr(1109 - 1054), 8), nzTpIcepk0o8(chr(1927 - 1879) + '\x6f' + chr(49) + chr(52) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(4556 - 4445) + chr(0b10110 + 0o35) + chr(0b10110 + 0o37), 0b1000), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + chr(54) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(12226 - 12115) + chr(1042 - 992) + chr(0b110111) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001 + 0o1) + chr(0b110011) + chr(0b101100 + 0o11), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(397 - 348) + chr(131 - 80) + chr(0b110100), 7537 - 7529), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1777 - 1727) + '\063' + '\x37', 40567 - 40559), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + '\063' + '\x35' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(0b110011) + '\061' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(8515 - 8404) + chr(49) + chr(0b1111 + 0o44) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1394 - 1344) + chr(0b1110 + 0o43) + chr(991 - 942), 47006 - 46998), nzTpIcepk0o8('\060' + chr(0b1101001 + 0o6) + '\063' + '\x37' + chr(1516 - 1465), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xef'), '\144' + chr(0b1100 + 0o131) + chr(99) + '\x6f' + '\x64' + chr(101))('\165' + '\164' + chr(4592 - 4490) + chr(1035 - 990) + chr(0b110110 + 0o2)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def x7Rn6yd_m2R_(dLZ3Z3RyCgN2): global NVzRZHU4VMxx if not NVzRZHU4VMxx: _jvLh5jLKh2C() try: return IHMWScIGLPri[dLZ3Z3RyCgN2] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xb6\xb2\xe3\xe2\xbf\x8a\x98'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + '\x65')('\165' + chr(0b1000110 + 0o56) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x95\xbb\xf4\xac\xa5\x87\x97\x86\x07\x05\xf2n\xd8\xd0\x8dbJ2\xdb~\xde\x13B\xf9\xb6g\x13\x0bx\x17\xc9\xfe4p\xf2\x88\xe9,\xec\x9c\xa8\xa0\xe5\xfe\xaf\xc5\xdf\xa6\x03\x10\xba)\x8f\x83\xc6,P5\x9a|\xddG\x16\xf8\xbdg\x17\x02~\\\xdb\xfa95\xe8\x80\xbd6\xa9\x92\xb5\xa0\xb1\xff\xb5\x8c\x9a\x8e\x0bD\xb6)\x9b\xca\xc1+W(\x94~\x91\x08\x10\xb0\xbc"\x01\nsR\x9a\xfc|f\xfc\x81\xac3\xe8\xd5\xe1\x95\xf0\xe0\xba\x8d\x91\x84J\x06\xb3/\x96\x83\xdb-\x035\x93u\x91\x03\x07\xf6\xb92\x0b\x17=D\xd9\xf59x\xfe\xc7\xe7p'), '\144' + chr(4079 - 3978) + chr(0b11001 + 0o112) + chr(0b1101111) + chr(0b101101 + 0o67) + '\145')(chr(117) + chr(0b11010 + 0o132) + '\146' + '\055' + '\x38'), dLZ3Z3RyCgN2) return jKfo5sq23P4w
fedora-infra/fedora-messaging
fedora_messaging/message.py
get_name
def get_name(cls): """ Retrieve the schema name associated with a message class. Returns: str: The schema name. Raises: TypeError: If the message class isn't registered. Check your entry point for correctness. """ global _registry_loaded if not _registry_loaded: load_message_classes() try: return _class_to_schema_name[cls] except KeyError: raise TypeError( "The class {} is not in the message registry, which indicates it is" ' not in the current list of entry points for "fedora_messaging".' " Please check that the class has been added to your package's" " entry points.".format(repr(cls)) )
python
def get_name(cls): """ Retrieve the schema name associated with a message class. Returns: str: The schema name. Raises: TypeError: If the message class isn't registered. Check your entry point for correctness. """ global _registry_loaded if not _registry_loaded: load_message_classes() try: return _class_to_schema_name[cls] except KeyError: raise TypeError( "The class {} is not in the message registry, which indicates it is" ' not in the current list of entry points for "fedora_messaging".' " Please check that the class has been added to your package's" " entry points.".format(repr(cls)) )
[ "def", "get_name", "(", "cls", ")", ":", "global", "_registry_loaded", "if", "not", "_registry_loaded", ":", "load_message_classes", "(", ")", "try", ":", "return", "_class_to_schema_name", "[", "cls", "]", "except", "KeyError", ":", "raise", "TypeError", "(", "\"The class {} is not in the message registry, which indicates it is\"", "' not in the current list of entry points for \"fedora_messaging\".'", "\" Please check that the class has been added to your package's\"", "\" entry points.\"", ".", "format", "(", "repr", "(", "cls", ")", ")", ")" ]
Retrieve the schema name associated with a message class. Returns: str: The schema name. Raises: TypeError: If the message class isn't registered. Check your entry point for correctness.
[ "Retrieve", "the", "schema", "name", "associated", "with", "a", "message", "class", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L103-L126
train
Retrieve the schema name associated with a message class.
GiP5xwVCF98Z,B3LV8Eo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=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(5928 - 5817) + chr(51) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2561 - 2450) + '\062' + '\062' + chr(2659 - 2605), 0o10), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + '\061' + chr(1974 - 1924), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(4116 - 4005) + '\x31' + chr(0b1011 + 0o45) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110000 + 0o3) + chr(55) + chr(0b11001 + 0o34), 0b1000), nzTpIcepk0o8(chr(1358 - 1310) + '\157' + chr(1386 - 1337) + '\066' + chr(0b110110 + 0o1), 0o10), nzTpIcepk0o8(chr(73 - 25) + '\157' + chr(2048 - 1998) + chr(2263 - 2209) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x37' + '\061', 0o10), nzTpIcepk0o8(chr(1414 - 1366) + '\x6f' + chr(0b100011 + 0o16) + '\062' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b110001) + chr(0b110100) + chr(50), 0o10), nzTpIcepk0o8(chr(1926 - 1878) + chr(2864 - 2753) + '\x31' + chr(0b110100) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + '\062' + chr(1460 - 1412) + chr(2436 - 2381), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(2221 - 2171) + '\x37' + chr(2339 - 2285), 24418 - 24410), nzTpIcepk0o8('\060' + chr(8384 - 8273) + chr(936 - 885) + '\x30' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(601 - 549) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(0b110001) + chr(0b100 + 0o54) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1065 - 1017) + chr(0b1001101 + 0o42) + chr(0b110101) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(11763 - 11652) + chr(55) + '\x33', 0b1000), nzTpIcepk0o8(chr(816 - 768) + chr(0b1101111) + '\062' + chr(0b100010 + 0o20) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b101000 + 0o11) + chr(55) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11001 + 0o126) + chr(0b101100 + 0o11) + chr(0b110011), 33942 - 33934), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(469 - 418) + chr(0b110100) + '\x31', 57002 - 56994), nzTpIcepk0o8(chr(48) + chr(111) + '\060', 0b1000), nzTpIcepk0o8(chr(648 - 600) + chr(0b1101111) + '\x31' + chr(0b11000 + 0o36) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(49) + chr(1360 - 1308), 0b1000), nzTpIcepk0o8(chr(381 - 333) + chr(111) + chr(0b110011) + chr(0b110010) + chr(0b101111 + 0o10), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b110101) + '\064', 0b1000), nzTpIcepk0o8(chr(726 - 678) + chr(4583 - 4472) + '\x32' + chr(57 - 7) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1041 - 993) + chr(0b1101111) + '\061' + chr(1021 - 969) + '\064', 35272 - 35264), nzTpIcepk0o8('\x30' + chr(0b1000111 + 0o50) + chr(0b101011 + 0o7) + '\x34' + chr(1743 - 1689), 27559 - 27551), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101 + 0o61), 49932 - 49924), nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + chr(50) + chr(1033 - 980) + chr(0b110000), 41235 - 41227), nzTpIcepk0o8(chr(0b110000) + chr(2841 - 2730) + chr(0b110011) + chr(0b110000) + '\064', 58701 - 58693), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(7412 - 7301) + '\x32' + '\x37' + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\060' + chr(1229 - 1176), 25190 - 25182), nzTpIcepk0o8('\060' + chr(137 - 26) + '\x31' + chr(681 - 627) + chr(2617 - 2562), 8), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b101100 + 0o103) + '\063' + chr(50) + chr(0b0 + 0o64), 0o10), nzTpIcepk0o8(chr(1648 - 1600) + '\x6f' + chr(0b100111 + 0o14) + chr(0b110010 + 0o1) + '\x37', 18662 - 18654), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b11111 + 0o22) + chr(974 - 925), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011001 + 0o26) + chr(51) + '\x32' + '\x37', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'6'), chr(0b11100 + 0o110) + chr(2329 - 2228) + chr(3345 - 3246) + chr(0b1101111) + '\144' + '\145')('\165' + '\164' + '\146' + chr(2009 - 1964) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BJoJQqD1t_wx(_1vzISbJ_R2i): global NVzRZHU4VMxx if not NVzRZHU4VMxx: _jvLh5jLKh2C() try: return cvEgpmTSBOmc[_1vzISbJ_R2i] except knUxyjfq07F9: raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'L\xfeob\x9e\x1b\xd6J B\x18\xfa\x9e\xab\x90fFT\xe4[B\x8f \x00\xa4\xb2\xcc\xfa\x01\xd5u\xc9\xa3\xdf\xe5\x05\xb1\xb8 \xa4l\xe4sn\xdd\x00\xdfP0\nC\xee\xd0\xa6\x8a%IO\xf5\x08\x0b\x88tT\xa5\xa4\xcc\xf9\x0b\xd2&\xc1\xaa\x9a\xb1\x1f\xb1\xff*\xa2j\xe4o,\x89W\xdbP \x16C\xe8\xd8\xe2\x86(\\I\xe9[[\x8ei\x1a\xb8\xa4\xcc\xf1\x0b\xd4&\x8a\xa2\xdf\xa1\x18\xa6\xbe\x16\xba}\xe5y#\x9a\x1e\xd9^qLC\xd7\xd2\xa7\x825M\x1b\xf3\x13N\x82kT\xb8\xbf\x8d\xe3D\xd2n\xcd\xe4\xd9\xa9\x16\xa7\xaci\xbfy\xe5* \x98\x12\xd9\x192\x06\x07\xe2\xda\xe2\x97)\x08B\xff\x0eY\xc1p\x15\xaf\xbc\x8d\xf0\x01\x81u\x88\xa1\xd4\xb1\x05\xad\xff9\xb8q\xf8~1\xd3'), '\x64' + chr(0b11111 + 0o106) + chr(8823 - 8724) + '\x6f' + chr(100) + chr(0b110000 + 0o65))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'i\xa59\t\xbaD\xd1V\x02= \xcd'), '\144' + '\145' + chr(99) + chr(0b1010100 + 0o33) + chr(8337 - 8237) + chr(101))(chr(0b1110101) + chr(2901 - 2785) + chr(0b1100110) + chr(0b10011 + 0o32) + chr(0b1100 + 0o54)))(VWshwTzZfwvC(_1vzISbJ_R2i)))
fedora-infra/fedora-messaging
fedora_messaging/message.py
load_message_classes
def load_message_classes(): """Load the 'fedora.messages' entry points and register the message classes.""" for message in pkg_resources.iter_entry_points("fedora.messages"): cls = message.load() _log.info( "Registering the '%s' key as the '%r' class in the Message " "class registry", message.name, cls, ) _schema_name_to_class[message.name] = cls _class_to_schema_name[cls] = message.name global _registry_loaded _registry_loaded = True
python
def load_message_classes(): """Load the 'fedora.messages' entry points and register the message classes.""" for message in pkg_resources.iter_entry_points("fedora.messages"): cls = message.load() _log.info( "Registering the '%s' key as the '%r' class in the Message " "class registry", message.name, cls, ) _schema_name_to_class[message.name] = cls _class_to_schema_name[cls] = message.name global _registry_loaded _registry_loaded = True
[ "def", "load_message_classes", "(", ")", ":", "for", "message", "in", "pkg_resources", ".", "iter_entry_points", "(", "\"fedora.messages\"", ")", ":", "cls", "=", "message", ".", "load", "(", ")", "_log", ".", "info", "(", "\"Registering the '%s' key as the '%r' class in the Message \"", "\"class registry\"", ",", "message", ".", "name", ",", "cls", ",", ")", "_schema_name_to_class", "[", "message", ".", "name", "]", "=", "cls", "_class_to_schema_name", "[", "cls", "]", "=", "message", ".", "name", "global", "_registry_loaded", "_registry_loaded", "=", "True" ]
Load the 'fedora.messages' entry points and register the message classes.
[ "Load", "the", "fedora", ".", "messages", "entry", "points", "and", "register", "the", "message", "classes", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L129-L142
train
Load the Fedora. messages entry points and register the message classes.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2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8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b101010 + 0o10) + '\061', 0o10), nzTpIcepk0o8(chr(1849 - 1801) + chr(111) + '\x32' + '\x32' + chr(2027 - 1977), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7378 - 7267) + chr(2296 - 2247) + chr(0b110001 + 0o4) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10011 + 0o37) + chr(0b110011) + chr(0b101010 + 0o6), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\067' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(0b10110 + 0o35) + chr(1098 - 1047) + '\061', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(0b1111 + 0o42) + chr(0b110011) + chr(0b10100 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(444 - 393) + chr(1830 - 1775) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b1100 + 0o50) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100001 + 0o22) + chr(724 - 675) + '\064', 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101101 + 0o2) + chr(0b110011) + chr(0b10001 + 0o43) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b100100 + 0o14) + chr(49), 9534 - 9526), nzTpIcepk0o8('\x30' + '\x6f' + chr(53) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(1369 - 1321) + chr(0b111111 + 0o60) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\062' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x35' + '\x30', 8), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1010011 + 0o34) + chr(50) + chr(922 - 868) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(2475 - 2425) + '\063' + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(7878 - 7767) + chr(51) + chr(0b10111 + 0o37) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(2374 - 2263) + '\062' + '\x36' + '\062', 907 - 899), nzTpIcepk0o8(chr(103 - 55) + chr(0b1101111) + chr(2297 - 2247) + '\060' + chr(0b110010), 10564 - 10556), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(5129 - 5018) + '\063' + '\x32' + '\x34', 65019 - 65011), nzTpIcepk0o8('\060' + chr(0b1100010 + 0o15) + '\061' + chr(48) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(9229 - 9118) + '\x31' + chr(0b101010 + 0o14) + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(7184 - 7073) + chr(0b10101 + 0o36) + '\067' + chr(48), 35149 - 35141), nzTpIcepk0o8('\060' + chr(111) + chr(0b1101 + 0o44) + chr(0b110010) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x37' + chr(0b1 + 0o60), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(1211 - 1157) + chr(871 - 816), 28827 - 28819), nzTpIcepk0o8('\060' + '\x6f' + '\x34' + chr(0b10011 + 0o36), 36829 - 36821), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(49) + chr(0b110011) + chr(0b11110 + 0o25), 0b1000), nzTpIcepk0o8(chr(1685 - 1637) + '\157' + chr(591 - 541) + chr(1784 - 1733) + chr(0b100001 + 0o17), 8), nzTpIcepk0o8('\060' + chr(715 - 604) + '\062' + chr(569 - 521), 0o10), nzTpIcepk0o8(chr(48) + chr(5929 - 5818) + chr(50) + chr(199 - 147) + '\065', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011), 8), nzTpIcepk0o8(chr(1217 - 1169) + chr(0b1101111) + chr(0b100010 + 0o21) + chr(52) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(0b11100 + 0o24) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(720 - 609) + chr(0b110110) + '\063', 62419 - 62411), nzTpIcepk0o8(chr(48) + chr(9947 - 9836) + '\063' + '\061', 0b1000), nzTpIcepk0o8(chr(688 - 640) + '\157' + chr(740 - 689) + chr(49) + chr(696 - 642), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(349 - 300) + chr(2877 - 2822) + chr(890 - 838), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1010011 + 0o34) + '\x35' + chr(0b10000 + 0o40), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbf'), chr(0b1100100) + chr(101) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def _jvLh5jLKh2C(): for FksNMH1w_ns6 in roI3spqORKae(RlNRVik21BGV, roI3spqORKae(ES5oEprVxulp(b'\xf8\xe6\r\xea\xe2\xbc3\x88\x12\xb5\xbc1Cj\xb9\x1c\xc0'), chr(0b1100100) + chr(0b1100101) + chr(7054 - 6955) + '\x6f' + '\144' + '\145')(chr(3588 - 3471) + '\164' + chr(0b1100110) + chr(45) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xf7\xf7\x0c\xf7\xcf\xb8s\x91\x05\xbf\x90 Kf\xa4'), '\144' + chr(0b100110 + 0o77) + chr(3980 - 3881) + chr(0b1011110 + 0o21) + chr(100) + chr(0b1010 + 0o133))(chr(117) + chr(116) + '\x66' + '\x2d' + chr(0b111000))): _1vzISbJ_R2i = FksNMH1w_ns6.ZERsdc7c1d8E() roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xf8\xea&\xe0\x84\x95*\xa3Q\xab\x91\x0e'), chr(6764 - 6664) + chr(3572 - 3471) + chr(0b100111 + 0o74) + chr(111) + chr(6559 - 6459) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(175 - 130) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xc3\xf7\x0f\xf1\xce\xad8\x8e\t\xa2\x84aXk\xb2H\x94\xbe\x85\x95\xa2\xbf \t\xd80J\xd7U3\xfd0\x82&\x97\xa2\x13z\xa2\x1d\xe2\xe1H\xf1\xd3\xf9)\x94\x05\xec\xae$_p\xb6\x0f\xd6\xbb\x95\xde\xe3\xa76P\x8a4^\x9eR/\xeai'), chr(0b100110 + 0o76) + '\x65' + chr(0b1100011) + chr(714 - 603) + chr(100) + '\145')(chr(0b111011 + 0o72) + '\164' + chr(0b1100110) + '\x2d' + '\070'), roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'\xc2\xde>\xda\x8f\x9b\r\xbd?\xa1\xaa$'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1001111 + 0o25) + chr(0b11 + 0o142))(chr(117) + chr(116) + chr(1236 - 1134) + '\055' + '\x38')), _1vzISbJ_R2i) IHMWScIGLPri[FksNMH1w_ns6.SLVB2BPA_mIe] = _1vzISbJ_R2i cvEgpmTSBOmc[_1vzISbJ_R2i] = FksNMH1w_ns6.SLVB2BPA_mIe global NVzRZHU4VMxx NVzRZHU4VMxx = nzTpIcepk0o8(chr(850 - 802) + '\x6f' + chr(373 - 324), 0b1000)
fedora-infra/fedora-messaging
fedora_messaging/message.py
get_message
def get_message(routing_key, properties, body): """ Construct a Message instance given the routing key, the properties and the body received from the AMQP broker. Args: routing_key (str): The AMQP routing key (will become the message topic) properties (pika.BasicProperties): the AMQP properties body (bytes): The encoded message body Raises: ValidationError: If Message validation failed or message body docoding/loading is impossible. """ if properties.headers is None: _log.error( "Message (body=%r) arrived without headers. " "A publisher is misbehaving!", body, ) properties.headers = {} try: MessageClass = get_class(properties.headers["fedora_messaging_schema"]) except KeyError: _log.error( "Message (headers=%r, body=%r) arrived without a schema header." " A publisher is misbehaving!", properties.headers, body, ) MessageClass = Message try: severity = properties.headers["fedora_messaging_severity"] except KeyError: _log.error( "Message (headers=%r, body=%r) arrived without a severity." " A publisher is misbehaving! Defaulting to INFO.", properties.headers, body, ) severity = INFO if properties.content_encoding is None: _log.error("Message arrived without a content encoding") properties.content_encoding = "utf-8" try: body = body.decode(properties.content_encoding) except UnicodeDecodeError as e: _log.error( "Unable to decode message body %r with %s content encoding", body, properties.content_encoding, ) raise ValidationError(e) try: body = json.loads(body) except ValueError as e: _log.error("Failed to load message body %r, %r", body, e) raise ValidationError(e) message = MessageClass( body=body, topic=routing_key, properties=properties, severity=severity ) try: message.validate() _log.debug("Successfully validated message %r", message) except jsonschema.exceptions.ValidationError as e: _log.error("Message validation of %r failed: %r", message, e) raise ValidationError(e) return message
python
def get_message(routing_key, properties, body): """ Construct a Message instance given the routing key, the properties and the body received from the AMQP broker. Args: routing_key (str): The AMQP routing key (will become the message topic) properties (pika.BasicProperties): the AMQP properties body (bytes): The encoded message body Raises: ValidationError: If Message validation failed or message body docoding/loading is impossible. """ if properties.headers is None: _log.error( "Message (body=%r) arrived without headers. " "A publisher is misbehaving!", body, ) properties.headers = {} try: MessageClass = get_class(properties.headers["fedora_messaging_schema"]) except KeyError: _log.error( "Message (headers=%r, body=%r) arrived without a schema header." " A publisher is misbehaving!", properties.headers, body, ) MessageClass = Message try: severity = properties.headers["fedora_messaging_severity"] except KeyError: _log.error( "Message (headers=%r, body=%r) arrived without a severity." " A publisher is misbehaving! Defaulting to INFO.", properties.headers, body, ) severity = INFO if properties.content_encoding is None: _log.error("Message arrived without a content encoding") properties.content_encoding = "utf-8" try: body = body.decode(properties.content_encoding) except UnicodeDecodeError as e: _log.error( "Unable to decode message body %r with %s content encoding", body, properties.content_encoding, ) raise ValidationError(e) try: body = json.loads(body) except ValueError as e: _log.error("Failed to load message body %r, %r", body, e) raise ValidationError(e) message = MessageClass( body=body, topic=routing_key, properties=properties, severity=severity ) try: message.validate() _log.debug("Successfully validated message %r", message) except jsonschema.exceptions.ValidationError as e: _log.error("Message validation of %r failed: %r", message, e) raise ValidationError(e) return message
[ "def", "get_message", "(", "routing_key", ",", "properties", ",", "body", ")", ":", "if", "properties", ".", "headers", "is", "None", ":", "_log", ".", "error", "(", "\"Message (body=%r) arrived without headers. \"", "\"A publisher is misbehaving!\"", ",", "body", ",", ")", "properties", ".", "headers", "=", "{", "}", "try", ":", "MessageClass", "=", "get_class", "(", "properties", ".", "headers", "[", "\"fedora_messaging_schema\"", "]", ")", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message (headers=%r, body=%r) arrived without a schema header.\"", "\" A publisher is misbehaving!\"", ",", "properties", ".", "headers", ",", "body", ",", ")", "MessageClass", "=", "Message", "try", ":", "severity", "=", "properties", ".", "headers", "[", "\"fedora_messaging_severity\"", "]", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message (headers=%r, body=%r) arrived without a severity.\"", "\" A publisher is misbehaving! Defaulting to INFO.\"", ",", "properties", ".", "headers", ",", "body", ",", ")", "severity", "=", "INFO", "if", "properties", ".", "content_encoding", "is", "None", ":", "_log", ".", "error", "(", "\"Message arrived without a content encoding\"", ")", "properties", ".", "content_encoding", "=", "\"utf-8\"", "try", ":", "body", "=", "body", ".", "decode", "(", "properties", ".", "content_encoding", ")", "except", "UnicodeDecodeError", "as", "e", ":", "_log", ".", "error", "(", "\"Unable to decode message body %r with %s content encoding\"", ",", "body", ",", "properties", ".", "content_encoding", ",", ")", "raise", "ValidationError", "(", "e", ")", "try", ":", "body", "=", "json", ".", "loads", "(", "body", ")", "except", "ValueError", "as", "e", ":", "_log", ".", "error", "(", "\"Failed to load message body %r, %r\"", ",", "body", ",", "e", ")", "raise", "ValidationError", "(", "e", ")", "message", "=", "MessageClass", "(", "body", "=", "body", ",", "topic", "=", "routing_key", ",", "properties", "=", "properties", ",", "severity", "=", "severity", ")", "try", ":", "message", ".", "validate", "(", ")", "_log", ".", "debug", "(", "\"Successfully validated message %r\"", ",", "message", ")", "except", "jsonschema", ".", "exceptions", ".", "ValidationError", "as", "e", ":", "_log", ".", "error", "(", "\"Message validation of %r failed: %r\"", ",", "message", ",", "e", ")", "raise", "ValidationError", "(", "e", ")", "return", "message" ]
Construct a Message instance given the routing key, the properties and the body received from the AMQP broker. Args: routing_key (str): The AMQP routing key (will become the message topic) properties (pika.BasicProperties): the AMQP properties body (bytes): The encoded message body Raises: ValidationError: If Message validation failed or message body docoding/loading is impossible.
[ "Construct", "a", "Message", "instance", "given", "the", "routing", "key", "the", "properties", "and", "the", "body", "received", "from", "the", "AMQP", "broker", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L145-L216
train
Construct a new Message instance from the properties and body.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5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dkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1405 - 1357) + chr(0b1101111) + chr(51) + '\065' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b11011 + 0o27), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1977 - 1926) + chr(50) + chr(0b101000 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(0b1000 + 0o50) + chr(50), 7257 - 7249), nzTpIcepk0o8(chr(280 - 232) + chr(0b1101111) + chr(0b110010) + chr(0b110011) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(2039 - 1989) + '\x34' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(54) + chr(55), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(53) + chr(568 - 514), 34867 - 34859), nzTpIcepk0o8(chr(543 - 495) + chr(0b1101111) + chr(49) + '\062' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10735 - 10624) + '\061' + chr(256 - 206) + '\x32', 0b1000), nzTpIcepk0o8(chr(1696 - 1648) + '\157' + chr(0b10010 + 0o41) + chr(383 - 328) + chr(320 - 267), 50253 - 50245), nzTpIcepk0o8('\x30' + chr(407 - 296) + '\067' + chr(2702 - 2649), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110110 + 0o71) + chr(0b110010) + chr(1597 - 1548) + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1000 + 0o57) + chr(0b110010), 57878 - 57870), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b110001 + 0o4) + chr(49), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b111 + 0o55) + chr(0b101010 + 0o12), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101011 + 0o4) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(0b110010) + chr(0b1011 + 0o52) + chr(100 - 45), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111001 + 0o66) + chr(409 - 360) + chr(1008 - 957) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1010111 + 0o30) + chr(0b110010) + chr(0b10 + 0o57) + chr(390 - 339), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11111 + 0o22) + chr(0b110000) + chr(135 - 84), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\062' + chr(1515 - 1466), 46875 - 46867), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b110111) + chr(48), 27312 - 27304), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b11 + 0o62) + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\066' + '\064', ord("\x08")), nzTpIcepk0o8(chr(1217 - 1169) + '\157' + chr(0b101101 + 0o4) + chr(0b1101 + 0o46) + chr(2785 - 2730), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(1515 - 1465), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + '\063' + chr(49) + chr(2373 - 2319), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(709 - 598) + '\x32' + '\067' + '\x31', 0b1000), nzTpIcepk0o8(chr(224 - 176) + chr(0b1100100 + 0o13) + '\x34' + '\066', 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + '\062' + '\066' + chr(448 - 398), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(0b10101 + 0o36) + '\x34' + '\064', 0o10), nzTpIcepk0o8(chr(1289 - 1241) + '\x6f' + '\x33' + chr(718 - 669), 28470 - 28462), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + '\066' + chr(0b11000 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + '\x35' + '\x32', 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b110011) + chr(0b101111 + 0o5), 18221 - 18213), nzTpIcepk0o8('\060' + chr(0b1011100 + 0o23) + '\061' + chr(0b1001 + 0o56), 12580 - 12572), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(6600 - 6489) + chr(0b100 + 0o56) + chr(835 - 784) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b110001) + '\067' + '\x36', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1405 - 1357) + chr(111) + chr(430 - 377) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc7'), chr(100) + '\x65' + chr(0b111100 + 0o47) + chr(0b1001001 + 0o46) + '\144' + '\x65')(chr(117) + chr(1431 - 1315) + chr(0b1100110) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KB3qSwugcArA(O7peZs8jMKVH, UtZvTnutzMHg, ryRPGaxqs24n): if roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xbcc\xa7\xed\xee\xfa\x91]:\x1a\x97^'), '\x64' + '\145' + '\143' + '\x6f' + '\144' + chr(101))(chr(9004 - 8887) + chr(0b1110100) + '\146' + '\055' + chr(56))) is None: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x98s\xe1\xf5\xf5\xd0\xa7x \x17\xb6Y'), chr(0b11101 + 0o107) + chr(0b10 + 0o143) + chr(3112 - 3013) + chr(9460 - 9349) + chr(0b100111 + 0o75) + '\145')('\165' + '\164' + chr(102) + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xa4\x7f\xa3\xf1\xfd\xc7\x92\x0e~0\x92Y\xf7\x07L\xd6.\x8f>\xf91\xb8\x0e\x8b\xd0\x7fj{\xba\xd1I\xc7\x909\xdfO}k\xfa\x0c\x9a4\xf0\xc3\xbc\xd0\x82L:;\x8eU\xebHI\xcdt\x8f2\xe20\xb3\x1d\x86\xd5)t|\xa9\x98'), chr(0b10111 + 0o115) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + '\055' + '\x38'), ryRPGaxqs24n) UtZvTnutzMHg.UyworZfslHjc = {} try: ERnAL8hBELi7 = x7Rn6yd_m2R_(UtZvTnutzMHg.UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'\x8f\x7f\xb4\xed\xee\xc1\xa8C3!\x8e\\\xe9S\x07\xc3X\xdc<\xe3&\xbc\x19'), chr(4074 - 3974) + chr(0b101101 + 0o70) + chr(0b1100011) + '\x6f' + '\x64' + '\x65')(chr(0b111 + 0o156) + '\x74' + chr(6761 - 6659) + '\055' + chr(0b11 + 0o65))]) except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x98s\xe1\xf5\xf5\xd0\xa7x \x17\xb6Y'), chr(0b1001000 + 0o34) + chr(749 - 648) + '\143' + chr(111) + '\x64' + '\x65')(chr(0b111110 + 0o67) + chr(0b111111 + 0o65) + '\x66' + '\055' + chr(437 - 381)))(roI3spqORKae(ES5oEprVxulp(b'\xa4\x7f\xa3\xf1\xfd\xc7\x92\x0e~:\x98\\\xea_\x1b\xd7:\x8a-\xa7c\xb3\x17\x8a\xcdb8`\xe7\x99G\xc0\x96p\xc1Ox/\xe8\x17\x9dr\xbf\xf7\xe8\x80\x96\x0e%1\x95X\xe3[I\xccb\xce;\xee1\xffX\xaf\x94/hp\xa2\xd0U\xda\x81k\x97Co/\xf2\x17\x9ax\xb5\xea\xfd\xd6\x9e@1s'), chr(0b1100100) + chr(9685 - 9584) + chr(0b111 + 0o134) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b100001 + 0o123) + chr(3248 - 3146) + chr(0b101101) + chr(557 - 501)), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xbcc\xa7\xed\xee\xfa\x91]:\x1a\x97^'), '\x64' + '\x65' + chr(0b1000101 + 0o36) + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + '\164' + '\146' + '\055' + chr(413 - 357))), ryRPGaxqs24n) ERnAL8hBELi7 = jKfo5sq23P4w try: VJbDJVoyX5hk = UtZvTnutzMHg.UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'\x8f\x7f\xb4\xed\xee\xc1\xa8C3!\x8e\\\xe9S\x07\xc3X\xdc:\xfd&\xa3\x11\x9a\xcd'), chr(0b1100100) + chr(622 - 521) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(8941 - 8840))('\x75' + chr(0b1110100) + chr(8030 - 7928) + chr(1195 - 1150) + chr(56))] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x98s\xe1\xf5\xf5\xd0\xa7x \x17\xb6Y'), chr(4886 - 4786) + '\x65' + chr(7994 - 7895) + chr(0b1001101 + 0o42) + chr(100) + '\145')(chr(0b10111 + 0o136) + chr(11618 - 11502) + chr(0b1011010 + 0o14) + chr(648 - 603) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b"\xa4\x7f\xa3\xf1\xfd\xc7\x92\x0e~:\x98\\\xea_\x1b\xd7:\x8a-\xa7c\xb3\x17\x8a\xcdb8`\xe7\x99G\xc0\x96p\xc1Ox/\xe8\x17\x9dr\xbf\xf7\xe8\x80\x96\x0e%7\x8bX\xfcS\x1d\xdd)\x8f\x1e\xab3\xa4\x1a\x82\xdd,uw\xbc\x99O\xc1\xc4t\xdeY~j\xf7\x1f\x9fs\xbe\xe5\xbd\x80\xb3K03\x88Q\xfaS\x07\xc3'\xdb0\xab\n\x9f>\xa1\x9a"), '\x64' + chr(0b1100101) + '\143' + chr(111) + chr(0b1100011 + 0o1) + '\145')(chr(12706 - 12589) + '\x74' + '\x66' + chr(0b101101) + '\070'), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xbcc\xa7\xed\xee\xfa\x91]:\x1a\x97^'), chr(0b1100100) + chr(0b1100101) + chr(1318 - 1219) + chr(4311 - 4200) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b1100110) + '\x2d' + '\070')), ryRPGaxqs24n) VJbDJVoyX5hk = tNK1nzOSYtNR if roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xa7v\xbf\xc9\xe6\xcf\xb4O\x1c\x1c\xaf\x0b'), '\144' + '\x65' + chr(1746 - 1647) + chr(0b1101111) + '\144' + chr(8457 - 8356))('\x75' + chr(7054 - 6938) + '\x66' + chr(230 - 185) + chr(0b100100 + 0o24))) is None: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x98s\xe1\xf5\xf5\xd0\xa7x \x17\xb6Y'), '\144' + chr(0b110100 + 0o61) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(0b111110 + 0o67) + '\x74' + chr(102) + chr(0b101101) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xa4\x7f\xa3\xf1\xfd\xc7\x92\x0e7 \x8fT\xf8_\r\x84p\xc6+\xe3,\xa4\x0c\xce\xd5\x7f~}\xa0\xcdC\xdc\x909\xd2D\x7f`\xfb\x17\x87}'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b11010 + 0o112) + chr(101))(chr(0b10111 + 0o136) + chr(0b1110100) + chr(0b1000 + 0o136) + chr(45) + chr(56))) UtZvTnutzMHg.NloKzoCaJNR6 = roI3spqORKae(ES5oEprVxulp(b'\x9cn\xb6\xaf\xa4'), chr(813 - 713) + chr(0b1110 + 0o127) + '\x63' + chr(7687 - 7576) + chr(0b1011110 + 0o6) + '\145')('\165' + '\164' + chr(0b1000111 + 0o37) + chr(45) + chr(56)) try: ryRPGaxqs24n = ryRPGaxqs24n.lfbFsdWlT3MB(UtZvTnutzMHg.NloKzoCaJNR6) except pZy5DBJ8WJod as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x98s\xe1\xf5\xf5\xd0\xa7x \x17\xb6Y'), chr(4380 - 4280) + '\145' + chr(3300 - 3201) + '\157' + '\144' + '\145')(chr(0b1110011 + 0o2) + '\x74' + '\146' + chr(1554 - 1509) + chr(1052 - 996)))(roI3spqORKae(ES5oEprVxulp(b"\xbct\xb1\xe0\xf0\xc5\xd7Z9r\x99X\xedU\r\xc1'\xc2:\xf80\xb0\x1f\x8b\x94=rv\xb7\x99\x03\xc0\xc4n\xde^t/\xba\r\xc9y\xbf\xec\xe8\xc5\x99Zv7\x93^\xe1^\x00\xca`"), chr(0b1011001 + 0o13) + chr(0b1100101) + chr(115 - 16) + chr(10842 - 10731) + '\x64' + chr(0b1010111 + 0o16))('\x75' + chr(116) + '\146' + '\055' + '\070'), ryRPGaxqs24n, roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'\xa7v\xbf\xc9\xe6\xcf\xb4O\x1c\x1c\xaf\x0b'), chr(0b1100100) + chr(0b101110 + 0o67) + chr(99) + chr(0b1101111) + '\x64' + chr(3713 - 3612))(chr(0b1110101 + 0o0) + chr(7808 - 7692) + chr(8813 - 8711) + chr(45) + chr(0b111000)))) raise NvSA9vIojSzD(wgf0sgcu_xPL) try: ryRPGaxqs24n = LNUKEwZDIbyb.OiapAM4bM0Ea(ryRPGaxqs24n) except WbNHlDKpyPtQ as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x98s\xe1\xf5\xf5\xd0\xa7x \x17\xb6Y'), chr(0b1011101 + 0o7) + '\x65' + '\143' + chr(0b1101111) + '\x64' + chr(0b11 + 0o142))('\165' + '\164' + chr(0b11 + 0o143) + '\055' + chr(1850 - 1794)))(roI3spqORKae(ES5oEprVxulp(b'\xaf{\xb9\xee\xf9\xc4\xd7Z9r\x91R\xef^I\xc9b\xdc,\xea$\xb4X\x8c\xdb;d2\xeb\xcb\n\x92\xc1k'), chr(3831 - 3731) + '\x65' + chr(0b101110 + 0o65) + chr(111) + '\x64' + '\145')('\x75' + chr(11044 - 10928) + chr(0b1100110) + '\x2d' + chr(0b111000)), ryRPGaxqs24n, wgf0sgcu_xPL) raise NvSA9vIojSzD(wgf0sgcu_xPL) FksNMH1w_ns6 = ERnAL8hBELi7(body=ryRPGaxqs24n, topic=O7peZs8jMKVH, properties=UtZvTnutzMHg, severity=VJbDJVoyX5hk) try: roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'\xae.\xe0\xe6\xff\xf3\x94M\x17\x14\x9c\x7f'), chr(7682 - 7582) + chr(101) + chr(99) + chr(111) + '\144' + chr(0b11011 + 0o112))(chr(5632 - 5515) + '\x74' + '\x66' + '\x2d' + chr(0b11000 + 0o40)))() roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x8e[\xe9\xd8\xa5\xc4\x98\x18\x03?\xb8g'), chr(0b110101 + 0o57) + '\x65' + '\x63' + '\157' + '\x64' + chr(7261 - 7160))(chr(8564 - 8447) + chr(0b110011 + 0o101) + '\146' + '\x2d' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xbao\xb3\xe1\xf9\xd3\x84H#>\x91D\xaeL\x08\xc8n\xcb>\xff&\xb5X\x83\xd1,ns\xa9\xdc\x06\x97\x96'), '\x64' + chr(0b1111 + 0o126) + chr(1454 - 1355) + '\x6f' + chr(7506 - 7406) + '\145')(chr(0b1110101 + 0o0) + '\164' + '\146' + '\055' + '\x38'), FksNMH1w_ns6) except roI3spqORKae(NaZezbzRqEZa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xbf{\xbc\xeb\xf8\xc1\x83G9<\xb8O\xfcU\x1b'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(102) + chr(1016 - 971) + chr(0b111000))) as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x98s\xe1\xf5\xf5\xd0\xa7x \x17\xb6Y'), chr(0b1000100 + 0o40) + '\x65' + chr(1217 - 1118) + chr(0b1101111) + chr(5583 - 5483) + '\145')('\165' + chr(0b1101100 + 0o10) + '\146' + chr(1223 - 1178) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xa4\x7f\xa3\xf1\xfd\xc7\x92\x0e 3\x91T\xea[\x1d\xcdh\xc1\x7f\xe4%\xf1]\x9c\x949|{\xa2\xdcB\x88\xc4<\xc5'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(116) + chr(9012 - 8910) + '\x2d' + '\x38'), FksNMH1w_ns6, wgf0sgcu_xPL) raise NvSA9vIojSzD(wgf0sgcu_xPL) return FksNMH1w_ns6
fedora-infra/fedora-messaging
fedora_messaging/message.py
dumps
def dumps(messages): """ Serialize messages to a JSON formatted str Args: messages (list): The list of messages to serialize. Each message in the messages is subclass of Messge. Returns: str: Serialized messages. Raises: TypeError: If at least one message is not instance of Message class or subclass. """ serialized_messages = [] try: for message in messages: message_dict = message._dump() serialized_messages.append(message_dict) except AttributeError: _log.error("Improper object for messages serialization.") raise TypeError("Message have to be instance of Message class or subclass.") return json.dumps(serialized_messages, sort_keys=True)
python
def dumps(messages): """ Serialize messages to a JSON formatted str Args: messages (list): The list of messages to serialize. Each message in the messages is subclass of Messge. Returns: str: Serialized messages. Raises: TypeError: If at least one message is not instance of Message class or subclass. """ serialized_messages = [] try: for message in messages: message_dict = message._dump() serialized_messages.append(message_dict) except AttributeError: _log.error("Improper object for messages serialization.") raise TypeError("Message have to be instance of Message class or subclass.") return json.dumps(serialized_messages, sort_keys=True)
[ "def", "dumps", "(", "messages", ")", ":", "serialized_messages", "=", "[", "]", "try", ":", "for", "message", "in", "messages", ":", "message_dict", "=", "message", ".", "_dump", "(", ")", "serialized_messages", ".", "append", "(", "message_dict", ")", "except", "AttributeError", ":", "_log", ".", "error", "(", "\"Improper object for messages serialization.\"", ")", "raise", "TypeError", "(", "\"Message have to be instance of Message class or subclass.\"", ")", "return", "json", ".", "dumps", "(", "serialized_messages", ",", "sort_keys", "=", "True", ")" ]
Serialize messages to a JSON formatted str Args: messages (list): The list of messages to serialize. Each message in the messages is subclass of Messge. Returns: str: Serialized messages. Raises: TypeError: If at least one message is not instance of Message class or subclass.
[ "Serialize", "messages", "to", "a", "JSON", "formatted", "str" ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L219-L242
train
Serializes a list of messages to a JSON formatted str.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT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ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b110111) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(53) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(8001 - 7890) + chr(49) + chr(0b110011) + '\065', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(1209 - 1156) + '\x31', 42769 - 42761), nzTpIcepk0o8(chr(178 - 130) + chr(0b1101111) + '\063' + chr(55) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + '\x35' + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10101 + 0o36) + chr(160 - 111) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + '\x35' + chr(1753 - 1699), 21045 - 21037), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(53) + chr(53), 58736 - 58728), nzTpIcepk0o8(chr(335 - 287) + '\x6f' + chr(0b110001) + '\x30' + '\061', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(49) + chr(55) + chr(102 - 48), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(915 - 864) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(605 - 557) + chr(1672 - 1621), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100110 + 0o12), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010101 + 0o32) + chr(536 - 485) + chr(0b110101) + chr(385 - 331), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\066' + chr(1796 - 1746), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(1022 - 970), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\064' + chr(0b110010 + 0o1), 0b1000), nzTpIcepk0o8(chr(57 - 9) + chr(111) + chr(0b10010 + 0o37) + chr(461 - 408) + chr(2122 - 2074), 0o10), nzTpIcepk0o8(chr(2146 - 2098) + '\x6f' + chr(55) + chr(2008 - 1959), 42256 - 42248), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(767 - 718) + chr(0b1111 + 0o41) + chr(0b110010), 56968 - 56960), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b101011 + 0o104) + '\061' + '\064' + chr(55), 39274 - 39266), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110010) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b10101 + 0o34) + '\067', 43553 - 43545), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(273 - 224) + chr(1503 - 1452) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + chr(51) + '\x34' + '\x33', 8), nzTpIcepk0o8(chr(1979 - 1931) + '\x6f' + '\x31' + '\065' + chr(0b110010 + 0o1), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\064' + chr(861 - 808), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8917 - 8806) + chr(50) + chr(55) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(227 - 174) + chr(962 - 907), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(289 - 239) + '\062' + chr(0b110000 + 0o7), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110111) + chr(2110 - 2061), ord("\x08")), nzTpIcepk0o8(chr(287 - 239) + chr(0b101 + 0o152) + chr(0b110011) + chr(55) + chr(273 - 224), 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b110000 + 0o3) + chr(1862 - 1809) + '\065', 43162 - 43154), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(10057 - 9946) + '\x33' + chr(51) + chr(813 - 759), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(55) + chr(0b101111 + 0o4), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b0 + 0o62) + chr(0b110101), 55710 - 55702), nzTpIcepk0o8(chr(48) + chr(5776 - 5665) + chr(51) + chr(544 - 493) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b10100 + 0o37), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(0b11101 + 0o30) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd5'), '\x64' + chr(101) + chr(0b1100001 + 0o2) + chr(10805 - 10694) + '\x64' + chr(9030 - 8929))('\165' + chr(116) + chr(10114 - 10012) + chr(0b100110 + 0o7) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Zjglmm8uenkC(szk4GvfzF2PT): dmpieXBcfjIF = [] try: for FksNMH1w_ns6 in szk4GvfzF2PT: e_kawlQhAkTC = FksNMH1w_ns6._dump() roI3spqORKae(dmpieXBcfjIF, roI3spqORKae(ES5oEprVxulp(b'\xb3y\x0e\x1d\x82K\x8eA\x07.+\xa9'), chr(7208 - 7108) + chr(1946 - 1845) + chr(0b111010 + 0o51) + chr(10297 - 10186) + '\x64' + chr(0b1100101))(chr(3517 - 3400) + '\x74' + chr(0b11110 + 0o110) + chr(335 - 290) + chr(56)))(e_kawlQhAkTC) except bIsJhlpYrrU2: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x8aDl^\x93\\\x99x\x1b\x045\xf8'), chr(100) + chr(0b1100101) + chr(0b1010000 + 0o23) + '\x6f' + '\x64' + chr(0b1011 + 0o132))('\165' + '\164' + chr(6432 - 6330) + '\055' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xb2@-[\x95\\\xac\\M.\x1c\xf6&c\x9a\xd2z\x8c\x1a\x19/\x02#<9\x84\x0eV\x9f\\\xf2\x8b\x90\x8c\xb2\x92/\xbd}z\x94Cs'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b110 + 0o137))(chr(0b110111 + 0o76) + '\164' + chr(187 - 85) + chr(703 - 658) + '\070')) raise jZIjKu8IFANs(roI3spqORKae(ES5oEprVxulp(b'\xb6H.Z\x9bK\xac\x0e\x05 \x08\xf9ct\x81\xd2~\x86HP,\x14$.6\x80\x0e\x05\xd0I\xb7\xb4\x9c\x9e\xad\x9a2\xb9)p\x97L.Z\xdaC\xbb\x0e\x1e4\x1c\xff/a\x9d\x812'), chr(9012 - 8912) + chr(7251 - 7150) + chr(0b1100011) + chr(111) + '\144' + chr(101))('\x75' + '\x74' + chr(258 - 156) + chr(802 - 757) + chr(442 - 386))) return roI3spqORKae(LNUKEwZDIbyb, roI3spqORKae(ES5oEprVxulp(b'\xa1G:E\x97A\xf1[\x08/\x15\xdf'), chr(0b10000 + 0o124) + chr(0b1100101) + '\143' + '\157' + '\x64' + chr(0b100000 + 0o105))('\x75' + chr(0b110110 + 0o76) + '\x66' + '\x2d' + '\070'))(dmpieXBcfjIF, sort_keys=nzTpIcepk0o8('\060' + '\x6f' + chr(49), ord("\x08")))
fedora-infra/fedora-messaging
fedora_messaging/message.py
loads
def loads(serialized_messages): """ Deserialize messages from a JSON formatted str Args: serialized_messages (JSON str): Returns: list: Deserialized message objects. Raises: ValidationError: If deserialized message validation failed. KeyError: If serialized_messages aren't properly serialized. ValueError: If serialized_messages is not valid JSON """ try: messages_dicts = json.loads(serialized_messages) except ValueError: _log.error("Loading serialized messages failed.") raise messages = [] for message_dict in messages_dicts: try: headers = message_dict["headers"] except KeyError: _log.error("Message saved without headers.") raise try: MessageClass = get_class(headers["fedora_messaging_schema"]) except KeyError: _log.error("Message (headers=%r) saved without a schema header.", headers) raise try: body = message_dict["body"] except KeyError: _log.error("Message saved without body.") raise try: id = message_dict["id"] except KeyError: _log.error("Message saved without id.") raise try: queue = message_dict["queue"] except KeyError: _log.warning("Message saved without queue.") queue = None try: topic = message_dict["topic"] except KeyError: _log.error("Message saved without topic.") raise try: severity = headers["fedora_messaging_severity"] except KeyError: _log.error("Message saved without a severity.") raise message = MessageClass( body=body, topic=topic, headers=headers, severity=severity ) try: message.validate() _log.debug("Successfully validated message %r", message) except jsonschema.exceptions.ValidationError as e: _log.error("Message validation of %r failed: %r", message, e) raise ValidationError(e) message.queue = queue message.id = id messages.append(message) return messages
python
def loads(serialized_messages): """ Deserialize messages from a JSON formatted str Args: serialized_messages (JSON str): Returns: list: Deserialized message objects. Raises: ValidationError: If deserialized message validation failed. KeyError: If serialized_messages aren't properly serialized. ValueError: If serialized_messages is not valid JSON """ try: messages_dicts = json.loads(serialized_messages) except ValueError: _log.error("Loading serialized messages failed.") raise messages = [] for message_dict in messages_dicts: try: headers = message_dict["headers"] except KeyError: _log.error("Message saved without headers.") raise try: MessageClass = get_class(headers["fedora_messaging_schema"]) except KeyError: _log.error("Message (headers=%r) saved without a schema header.", headers) raise try: body = message_dict["body"] except KeyError: _log.error("Message saved without body.") raise try: id = message_dict["id"] except KeyError: _log.error("Message saved without id.") raise try: queue = message_dict["queue"] except KeyError: _log.warning("Message saved without queue.") queue = None try: topic = message_dict["topic"] except KeyError: _log.error("Message saved without topic.") raise try: severity = headers["fedora_messaging_severity"] except KeyError: _log.error("Message saved without a severity.") raise message = MessageClass( body=body, topic=topic, headers=headers, severity=severity ) try: message.validate() _log.debug("Successfully validated message %r", message) except jsonschema.exceptions.ValidationError as e: _log.error("Message validation of %r failed: %r", message, e) raise ValidationError(e) message.queue = queue message.id = id messages.append(message) return messages
[ "def", "loads", "(", "serialized_messages", ")", ":", "try", ":", "messages_dicts", "=", "json", ".", "loads", "(", "serialized_messages", ")", "except", "ValueError", ":", "_log", ".", "error", "(", "\"Loading serialized messages failed.\"", ")", "raise", "messages", "=", "[", "]", "for", "message_dict", "in", "messages_dicts", ":", "try", ":", "headers", "=", "message_dict", "[", "\"headers\"", "]", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message saved without headers.\"", ")", "raise", "try", ":", "MessageClass", "=", "get_class", "(", "headers", "[", "\"fedora_messaging_schema\"", "]", ")", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message (headers=%r) saved without a schema header.\"", ",", "headers", ")", "raise", "try", ":", "body", "=", "message_dict", "[", "\"body\"", "]", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message saved without body.\"", ")", "raise", "try", ":", "id", "=", "message_dict", "[", "\"id\"", "]", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message saved without id.\"", ")", "raise", "try", ":", "queue", "=", "message_dict", "[", "\"queue\"", "]", "except", "KeyError", ":", "_log", ".", "warning", "(", "\"Message saved without queue.\"", ")", "queue", "=", "None", "try", ":", "topic", "=", "message_dict", "[", "\"topic\"", "]", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message saved without topic.\"", ")", "raise", "try", ":", "severity", "=", "headers", "[", "\"fedora_messaging_severity\"", "]", "except", "KeyError", ":", "_log", ".", "error", "(", "\"Message saved without a severity.\"", ")", "raise", "message", "=", "MessageClass", "(", "body", "=", "body", ",", "topic", "=", "topic", ",", "headers", "=", "headers", ",", "severity", "=", "severity", ")", "try", ":", "message", ".", "validate", "(", ")", "_log", ".", "debug", "(", "\"Successfully validated message %r\"", ",", "message", ")", "except", "jsonschema", ".", "exceptions", ".", "ValidationError", "as", "e", ":", "_log", ".", "error", "(", "\"Message validation of %r failed: %r\"", ",", "message", ",", "e", ")", "raise", "ValidationError", "(", "e", ")", "message", ".", "queue", "=", "queue", "message", ".", "id", "=", "id", "messages", ".", "append", "(", "message", ")", "return", "messages" ]
Deserialize messages from a JSON formatted str Args: serialized_messages (JSON str): Returns: list: Deserialized message objects. Raises: ValidationError: If deserialized message validation failed. KeyError: If serialized_messages aren't properly serialized. ValueError: If serialized_messages is not valid JSON
[ "Deserialize", "messages", "from", "a", "JSON", "formatted", "str" ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L245-L324
train
Deserialize a list of messages from a JSON formatted str.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,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zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11 + 0o56) + chr(0b110011) + chr(0b100010 + 0o16), 60907 - 60899), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110110) + chr(0b100110 + 0o20), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b100010 + 0o22), 16967 - 16959), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(1784 - 1735) + '\x35' + chr(611 - 561), 40778 - 40770), nzTpIcepk0o8(chr(0b110000) + chr(0b11101 + 0o122) + chr(1945 - 1895) + chr(0b110000 + 0o3) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + chr(0b1000 + 0o53) + chr(0b101110 + 0o11), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10110 + 0o33) + '\x30' + '\x30', 36465 - 36457), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b111000 + 0o67) + chr(0b110010) + '\x35' + chr(0b101101 + 0o3), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x35' + chr(0b101110 + 0o2), 12131 - 12123), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(194 - 144) + chr(0b110010 + 0o5) + chr(0b110000), 48545 - 48537), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\x31' + chr(48) + chr(2069 - 2016), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b0 + 0o61) + chr(53) + '\062', 8), nzTpIcepk0o8(chr(0b110000) + chr(4966 - 4855) + chr(51) + chr(0b110010) + chr(1297 - 1248), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(597 - 546) + '\x33' + chr(1049 - 1001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110101) + chr(0b1101 + 0o47), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(146 - 93) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1100010 + 0o15) + chr(0b110010) + '\062' + chr(0b11 + 0o57), 26378 - 26370), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101111 + 0o4) + '\064' + chr(0b100011 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110100) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(5073 - 4962) + chr(49) + chr(0b110000) + '\x35', 8), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(0b110001) + '\x36' + chr(0b110000), 41519 - 41511), nzTpIcepk0o8(chr(48) + chr(0b110011 + 0o74) + chr(0b110010) + chr(52) + '\067', 47446 - 47438), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + '\063' + chr(51) + chr(0b11001 + 0o35), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + chr(0b10001 + 0o45) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\x30' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6759 - 6648) + chr(0b101000 + 0o11) + chr(0b110000) + chr(0b1000 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b11100 + 0o32) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(11307 - 11196) + '\063' + chr(0b110110) + chr(0b11000 + 0o36), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(375 - 326) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110111) + '\060', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\x35' + chr(51), 11542 - 11534), nzTpIcepk0o8(chr(48) + chr(2556 - 2445) + chr(1653 - 1598) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(11433 - 11322) + chr(0b110010) + chr(53) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1096 - 1048) + '\157' + '\x31' + '\x34' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1001001 + 0o46) + chr(0b101001 + 0o15), 20186 - 20178), nzTpIcepk0o8(chr(1745 - 1697) + '\157' + chr(2796 - 2742) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(11086 - 10975) + '\063' + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101010 + 0o5) + chr(1565 - 1516) + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x36' + chr(778 - 729), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(1148 - 1099) + chr(0b110010), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1503 - 1455) + '\157' + chr(0b101001 + 0o14) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'v'), chr(0b1100100) + chr(0b1001000 + 0o35) + chr(5099 - 5000) + chr(111) + chr(5089 - 4989) + chr(0b1000000 + 0o45))(chr(8318 - 8201) + chr(11163 - 11047) + '\x66' + chr(0b1 + 0o54) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def OiapAM4bM0Ea(dmpieXBcfjIF): try: FTWYyqjd3mxV = LNUKEwZDIbyb.OiapAM4bM0Ea(dmpieXBcfjIF) except WbNHlDKpyPtQ: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), chr(100) + '\x65' + chr(5202 - 5103) + '\157' + chr(100) + chr(7045 - 6944))(chr(0b1110101) + chr(0b1001110 + 0o46) + chr(0b1100110) + '\x2d' + '\070'))(roI3spqORKae(ES5oEprVxulp(b"\x14\x99}\x0e\xf0q'\x88[\xdd7\x03\xb0\xb4\x85P\xf7\x82\xc2(\x15\xd4\xadS\xe6'\x86\xd6hYBP\xcb\x05("), chr(6867 - 6767) + chr(101) + chr(9568 - 9469) + '\x6f' + '\144' + chr(101))(chr(0b1110101) + '\164' + '\146' + chr(0b100101 + 0o10) + '\x38')) raise szk4GvfzF2PT = [] for e_kawlQhAkTC in FTWYyqjd3mxV: try: UyworZfslHjc = e_kawlQhAkTC[roI3spqORKae(ES5oEprVxulp(b'0\x93}\x0e\xfcm3'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(5014 - 4913))('\165' + '\164' + '\x66' + '\055' + '\070')] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), '\x64' + '\145' + chr(0b1100011) + chr(10174 - 10063) + chr(0b10101 + 0o117) + chr(2890 - 2789))('\x75' + chr(0b1000100 + 0o60) + chr(102) + chr(0b101101) + chr(2765 - 2709)))(roI3spqORKae(ES5oEprVxulp(b'\x15\x93o\x19\xf8x%\x88[\xd93\x0f\xb5\xf8\x9bC\xe6\x8e\x8d0\x04\x87\xb6W\xe0&\x90\x84}\x16'), chr(100) + '\x65' + chr(9546 - 9447) + chr(111) + '\x64' + chr(0b100011 + 0o102))(chr(0b1110101) + '\164' + chr(0b100110 + 0o100) + chr(1863 - 1818) + chr(56))) raise try: ERnAL8hBELi7 = x7Rn6yd_m2R_(UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'>\x93x\x05\xeb~\x1f\xc5M\xcb6\x0b\xb6\xb1\x82M\xcd\x95\x81-\x15\xca\xbf'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b111000))]) except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), chr(4851 - 4751) + chr(0b100010 + 0o103) + chr(99) + chr(111) + chr(0b110001 + 0o63) + '\x65')(chr(0b1110101) + chr(12843 - 12727) + chr(0b1100110) + chr(1414 - 1369) + chr(0b111000 + 0o0)))(roI3spqORKae(ES5oEprVxulp(b'\x15\x93o\x19\xf8x%\x88\x00\xd0 \x0b\xb5\xbd\x9eY\xaf\xc3\x90lP\xd4\xbfD\xe4&\xd5\x81gLCS\xdb\x15&P\xc1"\x12\xa2=\x9b}J\xf1z!\xccM\xcak'), chr(8681 - 8581) + chr(101) + '\x63' + chr(111) + chr(0b1000100 + 0o40) + '\145')(chr(0b1011 + 0o152) + '\x74' + '\146' + chr(130 - 85) + chr(0b111000)), UyworZfslHjc) raise try: ryRPGaxqs24n = e_kawlQhAkTC[roI3spqORKae(ES5oEprVxulp(b':\x99x\x13'), chr(0b1010110 + 0o16) + '\x65' + chr(99) + chr(0b1101111) + chr(7039 - 6939) + '\145')('\165' + '\164' + '\x66' + chr(71 - 26) + chr(2272 - 2216))] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), '\144' + '\x65' + '\143' + chr(111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b1001101 + 0o31) + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x15\x93o\x19\xf8x%\x88[\xd93\x0f\xb5\xf8\x9bC\xe6\x8e\x8d0\x04\x87\xbc]\xe5;\xdb'), chr(0b1100100) + chr(1167 - 1066) + chr(0b1100011) + '\x6f' + '\x64' + chr(9627 - 9526))('\x75' + chr(1281 - 1165) + chr(0b111000 + 0o56) + '\x2d' + chr(452 - 396))) raise try: maLnLg8O5zPT = e_kawlQhAkTC[roI3spqORKae(ES5oEprVxulp(b'1\x92'), chr(7353 - 7253) + chr(0b1100101) + chr(6003 - 5904) + chr(0b1101111) + '\144' + chr(8457 - 8356))('\x75' + chr(0b1110100) + '\146' + chr(427 - 382) + '\x38')] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), chr(4534 - 4434) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + '\x65')(chr(117) + '\x74' + '\146' + chr(1740 - 1695) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x15\x93o\x19\xf8x%\x88[\xd93\x0f\xb5\xf8\x9bC\xe6\x8e\x8d0\x04\x87\xb7V\xaf'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + '\144' + '\145')('\x75' + '\x74' + chr(0b1011 + 0o133) + chr(45) + chr(0b111000))) raise try: iRcFmb17G7aY = e_kawlQhAkTC[roI3spqORKae(ES5oEprVxulp(b')\x83y\x1f\xfc'), chr(100) + chr(0b10101 + 0o120) + '\x63' + chr(671 - 560) + chr(0b100111 + 0o75) + chr(0b1100101))(chr(12685 - 12568) + chr(0b11100 + 0o130) + '\146' + chr(0b101101) + chr(0b10000 + 0o50))] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b"/\x97n\x04\xf0q'"), chr(0b1100100) + '\145' + chr(0b111111 + 0o44) + chr(0b100010 + 0o115) + chr(100) + chr(0b101111 + 0o66))(chr(2868 - 2751) + chr(0b111000 + 0o74) + '\146' + chr(0b10101 + 0o30) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x15\x93o\x19\xf8x%\x88[\xd93\x0f\xb5\xf8\x9bC\xe6\x8e\x8d0\x04\x87\xafG\xe47\x90\xd8'), chr(100) + chr(0b111101 + 0o50) + '\143' + chr(7913 - 7802) + chr(4009 - 3909) + '\x65')(chr(0b1110101) + chr(0b1010100 + 0o40) + chr(8416 - 8314) + chr(45) + chr(0b111000))) iRcFmb17G7aY = None try: eddDFOEFy2dH = e_kawlQhAkTC[roI3spqORKae(ES5oEprVxulp(b',\x99l\x03\xfa'), chr(0b1100100) + chr(0b1001101 + 0o30) + chr(0b101010 + 0o71) + '\157' + '\144' + chr(1552 - 1451))('\165' + chr(9629 - 9513) + chr(0b1100110) + '\x2d' + '\x38')] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), chr(5884 - 5784) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b101 + 0o140))(chr(0b1110101) + '\164' + '\x66' + chr(1938 - 1893) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x15\x93o\x19\xf8x%\x88[\xd93\x0f\xb5\xf8\x9bC\xe6\x8e\x8d0\x04\x87\xaa]\xf1+\x96\xd8'), chr(4071 - 3971) + chr(101) + '\x63' + chr(111) + '\144' + chr(9812 - 9711))('\x75' + '\164' + chr(2628 - 2526) + '\055' + '\070')) raise try: VJbDJVoyX5hk = UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'>\x93x\x05\xeb~\x1f\xc5M\xcb6\x0b\xb6\xb1\x82M\xcd\x95\x873\x15\xd5\xb7F\xf8'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(1852 - 1752) + '\x65')('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(1288 - 1232))] except knUxyjfq07F9: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(7737 - 7637) + chr(101))('\165' + chr(0b110 + 0o156) + '\x66' + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b"\x15\x93o\x19\xf8x%\x88[\xd93\x0f\xb5\xf8\x9bC\xe6\x8e\x8d0\x04\x87\xbf\x12\xf2'\x83\x93|Q_E\x80"), chr(6372 - 6272) + '\145' + '\x63' + chr(12290 - 12179) + '\144' + '\145')(chr(0b1110101) + '\x74' + chr(451 - 349) + chr(0b101101) + '\x38')) raise FksNMH1w_ns6 = ERnAL8hBELi7(body=ryRPGaxqs24n, topic=eddDFOEFy2dH, headers=UyworZfslHjc, severity=VJbDJVoyX5hk) try: roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'\x1f\xc2,\x0e\xfaL#\xcbi\xfe$('), chr(100) + '\145' + chr(2622 - 2523) + chr(2399 - 2288) + chr(0b1100100) + '\145')(chr(0b10111 + 0o136) + chr(0b1110100) + chr(6306 - 6204) + chr(0b101101) + chr(0b100001 + 0o27)))() roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'?\xb7%0\xa0{/\x9e}\xd5\x000'), chr(0b1100100) + '\145' + chr(1877 - 1778) + chr(0b1101111) + chr(0b100100 + 0o100) + chr(2499 - 2398))(chr(117) + chr(116) + chr(0b1011010 + 0o14) + '\x2d' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x0b\x83\x7f\t\xfcl3\xce]\xd4)\x13\xf1\xae\x8dF\xfb\x82\x831\x15\xc3\xfe_\xe41\x86\x97i]\x0b\x19\xdc'), '\x64' + '\x65' + '\143' + '\x6f' + chr(100) + chr(101))(chr(0b1101110 + 0o7) + chr(3274 - 3158) + '\146' + chr(45) + '\070'), FksNMH1w_ns6) except roI3spqORKae(NaZezbzRqEZa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\x0e\x97p\x03\xfd~4\xc1G\xd6\x00\x18\xa3\xb7\x9e'), chr(7894 - 7794) + chr(0b1111 + 0o126) + '\x63' + chr(11582 - 11471) + '\x64' + chr(4165 - 4064))(chr(0b1110101) + chr(0b1110100) + chr(0b1011111 + 0o7) + chr(0b10111 + 0o26) + chr(0b111000))) as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')\x9f-\x1d\xf0o\x10\xfe^\xfd\x0e\x0e'), '\144' + '\x65' + chr(0b1100011) + chr(6698 - 6587) + '\x64' + '\x65')('\x75' + chr(0b1110100) + chr(102) + '\x2d' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x15\x93o\x19\xf8x%\x88^\xd9)\x03\xb5\xb9\x98C\xfd\x88\xc2*\x16\x87\xfb@\xa1$\x94\x9fb]O\x06\x8eDt'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(1880 - 1769) + chr(0b1100100) + chr(101))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + '\x38'), FksNMH1w_ns6, wgf0sgcu_xPL) raise NvSA9vIojSzD(wgf0sgcu_xPL) FksNMH1w_ns6.iRcFmb17G7aY = iRcFmb17G7aY FksNMH1w_ns6.maLnLg8O5zPT = maLnLg8O5zPT roI3spqORKae(szk4GvfzF2PT, roI3spqORKae(ES5oEprVxulp(b'\x10\xa2O^\xe1x\x07\xc7B\xd7\x10_'), chr(100) + chr(4321 - 4220) + chr(0b100 + 0o137) + '\x6f' + '\144' + chr(0b1000111 + 0o36))('\165' + '\164' + chr(0b1100110) + chr(45) + chr(0b111000)))(FksNMH1w_ns6) return szk4GvfzF2PT
fedora-infra/fedora-messaging
fedora_messaging/message.py
Message._filter_headers
def _filter_headers(self): """ Add headers designed for filtering messages based on objects. Returns: dict: Filter-related headers to be combined with the existing headers """ headers = {} for user in self.usernames: headers["fedora_messaging_user_{}".format(user)] = True for package in self.packages: headers["fedora_messaging_rpm_{}".format(package)] = True for container in self.containers: headers["fedora_messaging_container_{}".format(container)] = True for module in self.modules: headers["fedora_messaging_module_{}".format(module)] = True for flatpak in self.flatpaks: headers["fedora_messaging_flatpak_{}".format(flatpak)] = True return headers
python
def _filter_headers(self): """ Add headers designed for filtering messages based on objects. Returns: dict: Filter-related headers to be combined with the existing headers """ headers = {} for user in self.usernames: headers["fedora_messaging_user_{}".format(user)] = True for package in self.packages: headers["fedora_messaging_rpm_{}".format(package)] = True for container in self.containers: headers["fedora_messaging_container_{}".format(container)] = True for module in self.modules: headers["fedora_messaging_module_{}".format(module)] = True for flatpak in self.flatpaks: headers["fedora_messaging_flatpak_{}".format(flatpak)] = True return headers
[ "def", "_filter_headers", "(", "self", ")", ":", "headers", "=", "{", "}", "for", "user", "in", "self", ".", "usernames", ":", "headers", "[", "\"fedora_messaging_user_{}\"", ".", "format", "(", "user", ")", "]", "=", "True", "for", "package", "in", "self", ".", "packages", ":", "headers", "[", "\"fedora_messaging_rpm_{}\"", ".", "format", "(", "package", ")", "]", "=", "True", "for", "container", "in", "self", ".", "containers", ":", "headers", "[", "\"fedora_messaging_container_{}\"", ".", "format", "(", "container", ")", "]", "=", "True", "for", "module", "in", "self", ".", "modules", ":", "headers", "[", "\"fedora_messaging_module_{}\"", ".", "format", "(", "module", ")", "]", "=", "True", "for", "flatpak", "in", "self", ".", "flatpaks", ":", "headers", "[", "\"fedora_messaging_flatpak_{}\"", ".", "format", "(", "flatpak", ")", "]", "=", "True", "return", "headers" ]
Add headers designed for filtering messages based on objects. Returns: dict: Filter-related headers to be combined with the existing headers
[ "Add", "headers", "designed", "for", "filtering", "messages", "based", "on", "objects", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L417-L435
train
Add headers designed for filtering messages based on objects.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEe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3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(1417 - 1365), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1323 - 1212) + chr(0b100001 + 0o20) + '\062' + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2554 - 2443) + '\061' + chr(0b110000) + chr(0b110100), 21130 - 21122), nzTpIcepk0o8(chr(1904 - 1856) + chr(0b1101111) + chr(0b11110 + 0o23) + chr(54) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(4571 - 4460) + chr(0b100101 + 0o16) + chr(0b110100) + '\061', ord("\x08")), nzTpIcepk0o8(chr(419 - 371) + '\x6f' + '\063' + chr(0b10000 + 0o41) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110 + 0o60) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(2259 - 2211) + '\x6f' + '\062' + '\063' + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\064' + chr(0b100000 + 0o25), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\x31' + chr(1489 - 1437), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\066' + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000111 + 0o50) + chr(0b110111) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(1610 - 1560) + chr(0b110000) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8489 - 8378) + '\x31' + chr(48) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\067' + chr(52), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1222 - 1171) + chr(0b110001 + 0o6) + chr(0b10000 + 0o46), 40170 - 40162), nzTpIcepk0o8('\x30' + chr(3917 - 3806) + '\x37' + chr(0b1010 + 0o50), 0o10), nzTpIcepk0o8('\060' + chr(10121 - 10010) + chr(50) + chr(49) + chr(1331 - 1280), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(1038 - 990) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + '\063' + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + '\063' + '\x36' + '\x33', 0b1000), nzTpIcepk0o8(chr(914 - 866) + chr(2595 - 2484) + chr(0b110010) + chr(0b10111 + 0o37) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101001 + 0o11) + chr(52) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(0b100101 + 0o14) + chr(48) + chr(52), 8), nzTpIcepk0o8('\060' + chr(0b1000110 + 0o51) + chr(0b110011) + '\x31', 61675 - 61667), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(1770 - 1718), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100001 + 0o22) + chr(50) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x31' + chr(0b11010 + 0o31), 60132 - 60124), nzTpIcepk0o8(chr(962 - 914) + chr(111) + chr(0b110010) + '\x34' + chr(418 - 364), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011100 + 0o23) + chr(49) + chr(1184 - 1132) + chr(50), 55533 - 55525), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(469 - 417) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\064' + '\x31', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\064' + chr(1098 - 1047), 50 - 42), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x37' + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + chr(5620 - 5509) + chr(1983 - 1932) + chr(55) + chr(371 - 319), 8), nzTpIcepk0o8('\x30' + chr(0b1101100 + 0o3) + '\x31' + chr(0b100001 + 0o23) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100001 + 0o16) + chr(0b101101 + 0o5) + chr(1709 - 1661) + chr(2160 - 2110), ord("\x08")), nzTpIcepk0o8(chr(1558 - 1510) + '\157' + chr(1663 - 1614) + chr(0b101110 + 0o3) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + chr(0b1101 + 0o52) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + chr(0b110001) + chr(55) + chr(0b10101 + 0o37), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b100110 + 0o17) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'2'), chr(0b1100100) + '\145' + chr(0b10011 + 0o120) + chr(111) + chr(0b1010010 + 0o22) + '\x65')(chr(4612 - 4495) + chr(0b11100 + 0o130) + '\146' + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def HmVj1NQ4g_yB(hXMPsSrOQzbh): UyworZfslHjc = {} for E63X9RhwfuOn in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'i !\x03\x8f\xad^\xfeV'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + chr(5630 - 5530) + chr(1230 - 1129))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1449 - 1404) + '\070')): UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'z6 \x1e\x93\xadl\xf6@\xff\x00\\\xe4)\x92\x99e\xfe\xb0\xfa\x81\xef\xda9'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(100) + chr(0b101000 + 0o75))('\165' + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b110000 + 0o10)).q33KG3foQ_CJ(E63X9RhwfuOn)] = nzTpIcepk0o8('\060' + chr(111) + '\x31', 29836 - 29828) for _7JA9pI6sQUa in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"l2'\x1a\x80\xabV\xe8"), chr(100) + '\x65' + chr(0b1011100 + 0o7) + chr(111) + chr(100) + '\145')(chr(4723 - 4606) + '\x74' + chr(0b1010101 + 0o21) + chr(45) + chr(0b111000))): UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'z6 \x1e\x93\xadl\xf6@\xff\x00\\\xe4)\x92\x99e\xf9\xb3\xf2\xac\xcb\xdc'), '\x64' + chr(0b110101 + 0o60) + '\x63' + '\157' + chr(0b11011 + 0o111) + '\145')(chr(0b1000100 + 0o61) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b101001 + 0o17)).q33KG3foQ_CJ(_7JA9pI6sQUa)] = nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8) for LjETPHM4c_0l in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x7f<*\x05\x80\xa5]\xfeW\xff'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100100) + '\145')('\x75' + chr(11108 - 10992) + chr(0b1010000 + 0o26) + chr(45) + chr(56))): UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'z6 \x1e\x93\xadl\xf6@\xff\x00\\\xe4)\x92\x99e\xe8\xac\xf1\x87\xd1\xc8*|n\x8c0\xdb'), '\x64' + chr(3635 - 3534) + '\143' + '\157' + '\144' + chr(7800 - 7699))(chr(117) + '\x74' + chr(0b1010000 + 0o26) + '\055' + chr(233 - 177)).q33KG3foQ_CJ(LjETPHM4c_0l)] = nzTpIcepk0o8(chr(1238 - 1190) + chr(9506 - 9395) + chr(0b110 + 0o53), 8) for pOp6HxxfV61L in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"X'\x11\x1c\xaa\xa2J\xdeL\xba#h"), chr(100) + chr(6818 - 6717) + '\143' + chr(111) + '\144' + chr(0b111101 + 0o50))('\x75' + chr(8914 - 8798) + '\146' + chr(0b1110 + 0o37) + chr(56))): UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'z6 \x1e\x93\xadl\xf6@\xff\x00\\\xe4)\x92\x99e\xe6\xac\xfb\x86\xdc\xc4\x1bba'), '\x64' + chr(9992 - 9891) + chr(0b111 + 0o134) + '\157' + '\144' + '\x65')(chr(117) + chr(0b1110100) + '\146' + chr(45) + '\070').q33KG3foQ_CJ(pOp6HxxfV61L)] = nzTpIcepk0o8('\x30' + '\157' + chr(0b101000 + 0o11), 8) for sF_Q_O8W0yEq in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'z?%\x05\x91\xadX\xe8'), '\144' + '\x65' + chr(99) + chr(1675 - 1564) + '\x64' + '\x65')(chr(6875 - 6758) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000))): UyworZfslHjc[roI3spqORKae(ES5oEprVxulp(b'z6 \x1e\x93\xadl\xf6@\xff\x00\\\xe4)\x92\x99e\xed\xaf\xfe\x87\xc0\xc0/Fg\xae'), '\144' + '\145' + chr(0b1100011) + '\157' + '\144' + chr(0b1100101))('\165' + '\164' + chr(8746 - 8644) + chr(0b101101) + chr(0b10000 + 0o50)).q33KG3foQ_CJ(sF_Q_O8W0yEq)] = nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + '\x31', 8) return UyworZfslHjc
fedora-infra/fedora-messaging
fedora_messaging/message.py
Message._encoded_routing_key
def _encoded_routing_key(self): """The encoded routing key used to publish the message on the broker.""" topic = self.topic if config.conf["topic_prefix"]: topic = ".".join((config.conf["topic_prefix"].rstrip("."), topic)) return topic.encode("utf-8")
python
def _encoded_routing_key(self): """The encoded routing key used to publish the message on the broker.""" topic = self.topic if config.conf["topic_prefix"]: topic = ".".join((config.conf["topic_prefix"].rstrip("."), topic)) return topic.encode("utf-8")
[ "def", "_encoded_routing_key", "(", "self", ")", ":", "topic", "=", "self", ".", "topic", "if", "config", ".", "conf", "[", "\"topic_prefix\"", "]", ":", "topic", "=", "\".\"", ".", "join", "(", "(", "config", ".", "conf", "[", "\"topic_prefix\"", "]", ".", "rstrip", "(", "\".\"", ")", ",", "topic", ")", ")", "return", "topic", ".", "encode", "(", "\"utf-8\"", ")" ]
The encoded routing key used to publish the message on the broker.
[ "The", "encoded", "routing", "key", "used", "to", "publish", "the", "message", "on", "the", "broker", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L460-L465
train
The encoded routing key used to publish the message on the broker.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,Wdo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,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1187 - 1139) + chr(10219 - 10108) + chr(0b1 + 0o61) + chr(0b110111), 54318 - 54310), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(1725 - 1677) + '\063', 30236 - 30228), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110100) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(782 - 733) + chr(0b101000 + 0o12), 0b1000), nzTpIcepk0o8(chr(48) + chr(11320 - 11209) + '\x33' + '\061' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(55) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + chr(51) + chr(0b110110) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b11001 + 0o32) + chr(0b110010) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(49) + chr(566 - 518), 23459 - 23451), nzTpIcepk0o8(chr(48) + '\x6f' + '\x36' + chr(1459 - 1411), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\061' + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x36' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b100111 + 0o14) + '\067' + chr(1870 - 1816), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(53) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(54) + chr(52), 8014 - 8006), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2224 - 2175) + '\061' + chr(0b10000 + 0o43), 14371 - 14363), nzTpIcepk0o8(chr(48) + chr(0b1110 + 0o141) + chr(0b110010) + chr(2011 - 1960), 0b1000), nzTpIcepk0o8('\060' + chr(0b10001 + 0o136) + '\062' + chr(51 - 2) + '\x36', 0o10), nzTpIcepk0o8(chr(1190 - 1142) + chr(111) + chr(0b101010 + 0o10) + '\065' + '\066', 19015 - 19007), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b100010 + 0o22) + chr(2267 - 2216), 23590 - 23582), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b101100 + 0o103) + '\x33' + '\067' + chr(0b101111 + 0o6), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\x33' + chr(54), 12868 - 12860), nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + chr(0b1111 + 0o42) + chr(0b1101 + 0o43) + chr(0b11001 + 0o35), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(54) + chr(0b101000 + 0o10), 8), nzTpIcepk0o8(chr(2144 - 2096) + '\x6f' + chr(2227 - 2178) + '\x37' + chr(51), 21740 - 21732), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110100) + chr(612 - 558), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b110001) + '\061' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1994 - 1883) + chr(0b100100 + 0o15) + chr(0b110001) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(2128 - 2080) + '\x6f' + chr(51) + chr(0b110100) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1055 - 1006) + chr(0b11000 + 0o33) + chr(0b110100), 53416 - 53408), nzTpIcepk0o8(chr(48) + chr(3011 - 2900) + chr(0b110001) + chr(0b110010) + '\067', ord("\x08")), nzTpIcepk0o8(chr(2178 - 2130) + chr(9700 - 9589) + '\063' + chr(55) + chr(355 - 305), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110 + 0o54) + chr(0b110111) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + '\061' + chr(48) + chr(0b0 + 0o64), ord("\x08")), nzTpIcepk0o8(chr(2242 - 2194) + '\157' + '\063' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b1101 + 0o44) + chr(0b100110 + 0o17), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101110 + 0o1) + '\063' + chr(0b11100 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(495 - 447) + '\157' + chr(0b110010) + chr(50) + chr(120 - 72), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(51) + chr(1455 - 1407) + chr(0b110000 + 0o5), 8907 - 8899)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(201 - 153) + chr(5013 - 4902) + chr(53) + chr(2145 - 2097), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'9'), chr(0b1100100 + 0o0) + chr(6259 - 6158) + '\143' + '\x6f' + chr(100) + '\145')(chr(117) + chr(12670 - 12554) + chr(102) + chr(1485 - 1440) + chr(2699 - 2643)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def tEIZA3Uhqs6q(hXMPsSrOQzbh): eddDFOEFy2dH = hXMPsSrOQzbh.eddDFOEFy2dH if roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'v\x06rY\xffx\x85\xad\xe7j\xe5w'), '\144' + chr(0b1010110 + 0o17) + '\143' + chr(111) + chr(100) + chr(0b1100101))('\165' + chr(0b1100011 + 0o21) + chr(9119 - 9017) + '\055' + chr(0b1001 + 0o57)))[roI3spqORKae(ES5oEprVxulp(b'c,Qc\xaa`\x82\xa7\xedV\xe4N'), chr(6589 - 6489) + chr(101) + chr(0b1100 + 0o127) + '\157' + chr(0b1100100) + '\x65')('\165' + chr(116) + '\x66' + '\x2d' + '\x38')]: eddDFOEFy2dH = roI3spqORKae(ES5oEprVxulp(b'9'), chr(0b1100100) + '\145' + chr(5929 - 5830) + chr(111) + chr(6919 - 6819) + chr(101))(chr(0b1110101) + chr(1350 - 1234) + '\146' + '\x2d' + '\x38').Y4yM9BcfTCNq((kgkKUcD36lls.conf[roI3spqORKae(ES5oEprVxulp(b'c,Qc\xaa`\x82\xa7\xedV\xe4N'), chr(100) + chr(0b1100101) + '\x63' + '\157' + chr(6075 - 5975) + chr(101))(chr(117) + chr(0b1110100) + chr(8902 - 8800) + chr(1085 - 1040) + chr(1657 - 1601))].rstrip(roI3spqORKae(ES5oEprVxulp(b'9'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')(chr(117) + '\164' + '\x66' + '\055' + chr(2693 - 2637))), eddDFOEFy2dH)) return roI3spqORKae(eddDFOEFy2dH, roI3spqORKae(ES5oEprVxulp(b'N2hk\x9by\x94\xb0\xe7\x04\xc5W'), chr(0b1100100) + chr(101) + '\x63' + '\x6f' + '\x64' + chr(0b1100101))('\165' + chr(0b101011 + 0o111) + chr(0b101100 + 0o72) + chr(0b101101) + chr(0b110101 + 0o3)))(roI3spqORKae(ES5oEprVxulp(b"b7G'\xf1"), chr(0b10000 + 0o124) + chr(5697 - 5596) + chr(0b10001 + 0o122) + chr(0b1000100 + 0o53) + chr(100) + chr(8184 - 8083))(chr(117) + '\164' + chr(0b101100 + 0o72) + '\055' + chr(2055 - 1999)))
fedora-infra/fedora-messaging
fedora_messaging/message.py
Message.validate
def validate(self): """ Validate the headers and body with the message schema, if any. In addition to the user-provided schema, all messages are checked against the base schema which requires certain message headers and the that body be a JSON object. .. warning:: This method should not be overridden by sub-classes. Raises: jsonschema.ValidationError: If either the message headers or the message body are invalid. jsonschema.SchemaError: If either the message header schema or the message body schema are invalid. """ for schema in (self.headers_schema, Message.headers_schema): _log.debug( 'Validating message headers "%r" with schema "%r"', self._headers, schema, ) jsonschema.validate(self._headers, schema) for schema in (self.body_schema, Message.body_schema): _log.debug( 'Validating message body "%r" with schema "%r"', self.body, schema ) jsonschema.validate(self.body, schema)
python
def validate(self): """ Validate the headers and body with the message schema, if any. In addition to the user-provided schema, all messages are checked against the base schema which requires certain message headers and the that body be a JSON object. .. warning:: This method should not be overridden by sub-classes. Raises: jsonschema.ValidationError: If either the message headers or the message body are invalid. jsonschema.SchemaError: If either the message header schema or the message body schema are invalid. """ for schema in (self.headers_schema, Message.headers_schema): _log.debug( 'Validating message headers "%r" with schema "%r"', self._headers, schema, ) jsonschema.validate(self._headers, schema) for schema in (self.body_schema, Message.body_schema): _log.debug( 'Validating message body "%r" with schema "%r"', self.body, schema ) jsonschema.validate(self.body, schema)
[ "def", "validate", "(", "self", ")", ":", "for", "schema", "in", "(", "self", ".", "headers_schema", ",", "Message", ".", "headers_schema", ")", ":", "_log", ".", "debug", "(", "'Validating message headers \"%r\" with schema \"%r\"'", ",", "self", ".", "_headers", ",", "schema", ",", ")", "jsonschema", ".", "validate", "(", "self", ".", "_headers", ",", "schema", ")", "for", "schema", "in", "(", "self", ".", "body_schema", ",", "Message", ".", "body_schema", ")", ":", "_log", ".", "debug", "(", "'Validating message body \"%r\" with schema \"%r\"'", ",", "self", ".", "body", ",", "schema", ")", "jsonschema", ".", "validate", "(", "self", ".", "body", ",", "schema", ")" ]
Validate the headers and body with the message schema, if any. In addition to the user-provided schema, all messages are checked against the base schema which requires certain message headers and the that body be a JSON object. .. warning:: This method should not be overridden by sub-classes. Raises: jsonschema.ValidationError: If either the message headers or the message body are invalid. jsonschema.SchemaError: If either the message header schema or the message body schema are invalid.
[ "Validate", "the", "headers", "and", "body", "with", "the", "message", "schema", "if", "any", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/message.py#L513-L540
train
Validate the message headers and body with the user - provided schema.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHy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ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(7344 - 7233) + chr(49) + chr(823 - 774) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(50) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(149 - 101) + chr(0b1101111) + chr(49) + chr(0b100010 + 0o20) + chr(0b110110), 50761 - 50753), nzTpIcepk0o8(chr(1354 - 1306) + chr(111) + '\x32' + chr(996 - 945) + chr(52), 2018 - 2010), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b1100 + 0o51) + chr(0b10001 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + '\x31' + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100001 + 0o20) + chr(0b11010 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1011111 + 0o20) + chr(0b110011) + '\063' + '\x36', 1511 - 1503), nzTpIcepk0o8(chr(1242 - 1194) + chr(111) + '\x31' + chr(1063 - 1011) + '\067', 30168 - 30160), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(50) + '\x36' + chr(0b101000 + 0o12), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(2009 - 1961) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + '\066' + chr(0b1001 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(7102 - 6991) + chr(1213 - 1163) + chr(0b110111) + '\066', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(459 - 410) + '\x36' + chr(55), 949 - 941), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100010 + 0o25) + chr(1351 - 1303), 0o10), nzTpIcepk0o8('\x30' + chr(7389 - 7278) + chr(1584 - 1535) + chr(0b1 + 0o65) + chr(0b1 + 0o63), 0o10), nzTpIcepk0o8(chr(1730 - 1682) + chr(0b1010010 + 0o35) + chr(2111 - 2060) + '\x31' + chr(0b101001 + 0o10), 0b1000), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + '\061' + chr(0b11110 + 0o27) + chr(1157 - 1109), 62875 - 62867), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(964 - 914) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b110101) + '\x31', 3700 - 3692), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(2227 - 2178) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(8627 - 8516) + '\x31' + chr(0b110011) + '\060', 62200 - 62192), nzTpIcepk0o8(chr(2212 - 2164) + '\157' + '\061' + chr(2430 - 2376) + chr(1980 - 1930), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + chr(0b110011) + chr(0b110100) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(2148 - 2100) + chr(0b1101111) + '\063' + chr(1240 - 1186) + chr(0b10101 + 0o33), 0o10), nzTpIcepk0o8('\x30' + chr(0b1111 + 0o140) + chr(51) + '\x37' + '\067', 50773 - 50765), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b11101 + 0o122) + chr(0b110001 + 0o1) + chr(0b1101 + 0o46) + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(793 - 742) + chr(0b101011 + 0o12) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b100100 + 0o15) + '\067' + chr(2030 - 1978), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(1884 - 1836) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + chr(0b110010) + '\065' + chr(0b11000 + 0o35), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(54) + chr(0b110011), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110101), 16395 - 16387), nzTpIcepk0o8(chr(1270 - 1222) + chr(0b11010 + 0o125) + chr(2025 - 1975) + '\067' + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1520 - 1469), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b11 + 0o57) + chr(0b11110 + 0o24), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11111 + 0o23) + chr(50) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + '\063' + '\x34' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b110000) + chr(0b110011 + 0o1), 25304 - 25296), nzTpIcepk0o8(chr(680 - 632) + '\x6f' + '\062' + '\066' + chr(0b110101), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b101010 + 0o105) + chr(0b100011 + 0o22) + '\x30', 36085 - 36077)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'`'), '\x64' + chr(3722 - 3621) + chr(1824 - 1725) + '\157' + chr(100) + chr(3523 - 3422))(chr(117) + chr(1173 - 1057) + chr(5483 - 5381) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G40dcSccAFaB(hXMPsSrOQzbh): for HkLOSIHgtf7k in (roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'&p7\xf8\n\xbfz\x81\x14\xd1*V\xd3\x16'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')(chr(12179 - 12062) + '\164' + '\146' + chr(0b11110 + 0o17) + '\070')), roI3spqORKae(jKfo5sq23P4w, roI3spqORKae(ES5oEprVxulp(b'&p7\xf8\n\xbfz\x81\x14\xd1*V\xd3\x16'), chr(1092 - 992) + chr(101) + '\x63' + chr(111) + '\144' + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + chr(1205 - 1160) + '\070'))): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')To\xc6V\xa9f\xe82\xdf\x07i'), chr(5653 - 5553) + '\x65' + chr(0b100010 + 0o101) + chr(6239 - 6128) + chr(100) + chr(6826 - 6725))(chr(0b1110101) + '\164' + chr(3534 - 3432) + chr(970 - 925) + chr(0b101011 + 0o15)))(roI3spqORKae(ES5oEprVxulp(b"\x18t:\xf5\x0b\xac}\xb7\t\xd5b^\xdb\x04K\x15\xae\r\xb7\xc1\xed9\x16\x87\x82\x8c\xbe\xccY\xf2\x8f\x13z\xd0w\xfa\xb7\x90'\xdd+x7\xbcM\xe8{\xfc"), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + '\144' + chr(0b10 + 0o143))(chr(0b1110101) + chr(8583 - 8467) + chr(0b1100110) + chr(0b10000 + 0o35) + '\070'), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'*Pf\xd6=\x92Z\xef!\xfd-\x01'), chr(2095 - 1995) + chr(101) + '\x63' + chr(111) + '\x64' + '\145')('\x75' + chr(0b1110100) + chr(0b1001110 + 0o30) + '\055' + chr(56))), HkLOSIHgtf7k) roI3spqORKae(NaZezbzRqEZa, roI3spqORKae(ES5oEprVxulp(b'\t!f\xf8\x0c\x9ej\xbd&\xf4#q'), chr(9628 - 9528) + chr(101) + '\143' + chr(0b11101 + 0o122) + chr(4256 - 4156) + '\x65')(chr(9401 - 9284) + chr(0b1010010 + 0o42) + '\146' + '\055' + chr(0b11101 + 0o33)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'*Pf\xd6=\x92Z\xef!\xfd-\x01'), '\x64' + chr(6895 - 6794) + '\143' + chr(4282 - 4171) + chr(100) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b1000 + 0o45) + chr(56))), HkLOSIHgtf7k) for HkLOSIHgtf7k in (roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b',z2\xe50\xbej\xb6\x02\xdf#'), chr(0b100010 + 0o102) + chr(2165 - 2064) + chr(99) + chr(111) + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1886 - 1841) + chr(0b101101 + 0o13))), roI3spqORKae(jKfo5sq23P4w, roI3spqORKae(ES5oEprVxulp(b',z2\xe50\xbej\xb6\x02\xdf#'), chr(6771 - 6671) + chr(0b1001110 + 0o27) + '\x63' + chr(0b1101111) + chr(4897 - 4797) + chr(101))('\165' + chr(0b100 + 0o160) + '\146' + chr(0b10001 + 0o34) + chr(0b0 + 0o70)))): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b')To\xc6V\xa9f\xe82\xdf\x07i'), chr(100) + chr(101) + chr(99) + '\157' + '\x64' + '\145')('\x75' + '\164' + '\146' + chr(111 - 66) + chr(2947 - 2891)))(roI3spqORKae(ES5oEprVxulp(b'\x18t:\xf5\x0b\xac}\xb7\t\xd5b^\xdb\x04K\x15\xae\r\xb7\xcb\xe7<\x0b\xc2\xd2\xda\xec\xcc\\\xf7\xc4Ge\x99p\xf1\xff\x86)\xd4n7s\xeeM'), '\x64' + chr(0b1100101) + '\143' + chr(3720 - 3609) + '\144' + '\x65')(chr(0b1100011 + 0o22) + chr(7935 - 7819) + chr(0b100101 + 0o101) + '\055' + '\x38'), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'<l\x04\xcc(\xacq\xaf\x14\x80v]'), chr(6704 - 6604) + chr(0b1010101 + 0o20) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b110000 + 0o66) + chr(0b101101) + '\070')), HkLOSIHgtf7k) roI3spqORKae(NaZezbzRqEZa, roI3spqORKae(ES5oEprVxulp(b'\t!f\xf8\x0c\x9ej\xbd&\xf4#q'), chr(0b111100 + 0o50) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b111111 + 0o45) + chr(101))(chr(0b110010 + 0o103) + chr(0b1010110 + 0o36) + chr(0b1011001 + 0o15) + '\x2d' + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'<l\x04\xcc(\xacq\xaf\x14\x80v]'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b100101 + 0o112) + '\x64' + chr(0b1001110 + 0o27))(chr(6671 - 6554) + '\164' + chr(7497 - 7395) + chr(0b101101) + chr(0b11010 + 0o36))), HkLOSIHgtf7k)
fedora-infra/fedora-messaging
fedora_messaging/message.py
Message._dump
def _dump(self): """ Dump message attributes. Returns: dict: A dictionary of message attributes. """ return { "topic": self.topic, "headers": self._headers, "id": self.id, "body": self.body, "queue": self.queue, }
python
def _dump(self): """ Dump message attributes. Returns: dict: A dictionary of message attributes. """ return { "topic": self.topic, "headers": self._headers, "id": self.id, "body": self.body, "queue": self.queue, }
[ "def", "_dump", "(", "self", ")", ":", "return", "{", "\"topic\"", ":", "self", ".", "topic", ",", "\"headers\"", ":", "self", ".", "_headers", ",", "\"id\"", ":", "self", ".", "id", ",", "\"body\"", ":", "self", ".", "body", ",", "\"queue\"", ":", "self", ".", "queue", ",", "}" ]
Dump message attributes. Returns: dict: A dictionary of message attributes.
[ "Dump", "message", "attributes", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15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qQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(6423 - 6312) + '\x32' + chr(0b110100 + 0o0) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(2083 - 2031) + '\067', 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(2318 - 2269) + chr(851 - 803) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\067' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b11111 + 0o120) + chr(0b10110 + 0o34) + chr(0b110110) + chr(910 - 860), 48030 - 48022), nzTpIcepk0o8(chr(0b110000) + chr(0b10110 + 0o131) + chr(0b110011) + chr(0b10111 + 0o36) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\065' + chr(52), 29428 - 29420), nzTpIcepk0o8(chr(897 - 849) + chr(0b1001110 + 0o41) + chr(50), 57826 - 57818), nzTpIcepk0o8(chr(1173 - 1125) + chr(111) + chr(0b1111 + 0o44) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(5816 - 5705) + chr(0b110010) + chr(0b10010 + 0o42) + chr(59 - 11), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(112 - 63) + chr(50) + '\x31', 0b1000), nzTpIcepk0o8(chr(209 - 161) + '\157' + chr(150 - 100) + '\062' + chr(50), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(0b110010) + chr(621 - 566) + chr(1473 - 1423), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b100010 + 0o17) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + '\061' + '\x37' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(8310 - 8199) + '\061' + chr(0b1101 + 0o45) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x30' + chr(0b10 + 0o65), 0b1000), nzTpIcepk0o8(chr(48) + chr(11809 - 11698) + chr(0b110 + 0o57) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(52) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + '\x34', 21228 - 21220), nzTpIcepk0o8('\060' + '\157' + chr(1451 - 1396) + chr(49), 36766 - 36758), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10110 + 0o34) + '\066' + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(9357 - 9246) + '\061' + '\x32' + chr(1256 - 1206), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(48) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110110 + 0o71) + chr(51) + chr(0b110101) + chr(858 - 808), 17255 - 17247), nzTpIcepk0o8(chr(1014 - 966) + '\x6f' + chr(0b100111 + 0o14) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x35' + '\065', 0o10), nzTpIcepk0o8(chr(86 - 38) + chr(657 - 546) + '\x36' + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + '\x30' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + chr(0b110011) + chr(0b100010 + 0o22) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(49) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10 + 0o61) + chr(2518 - 2463) + '\x32', 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b10011 + 0o36) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(53) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(384 - 335) + chr(0b110010) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(2175 - 2126) + chr(0b110001) + chr(0b100001 + 0o24), 25583 - 25575), nzTpIcepk0o8(chr(0b110000) + chr(0b1011001 + 0o26) + '\061' + '\x35' + chr(250 - 200), 20322 - 20314), nzTpIcepk0o8('\060' + chr(9187 - 9076) + chr(51) + '\x36' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101 + 0o142) + chr(1844 - 1795) + '\x35' + chr(0b11000 + 0o36), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\065', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110101) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x89'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')(chr(0b1110101) + chr(0b1001000 + 0o54) + '\146' + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def EMYuo9OX1Zc0(hXMPsSrOQzbh): return {roI3spqORKae(ES5oEprVxulp(b'\xd3\x084R\xd1'), '\x64' + chr(0b1001001 + 0o34) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + chr(0b1010111 + 0o35) + '\146' + chr(1822 - 1777) + '\070'): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc2\x03 \x7f\xf4\xa0)Dd\x925\xda'), chr(0b11 + 0o141) + '\x65' + '\x63' + chr(1719 - 1608) + chr(100) + '\145')('\x75' + chr(9182 - 9066) + '\146' + chr(0b100010 + 0o13) + chr(2411 - 2355))), roI3spqORKae(ES5oEprVxulp(b'\xcf\x02%_\xd7\x9d\x1f'), chr(7039 - 6939) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + chr(1264 - 1219) + '\070'): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc3"tq\xe0\xb0?3[\xef>\xa0'), '\144' + '\145' + chr(99) + chr(111) + '\144' + '\145')(chr(7420 - 7303) + chr(0b1110100) + '\146' + chr(863 - 818) + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\xce\x03'), '\x64' + chr(0b11110 + 0o107) + chr(0b111 + 0o134) + chr(111) + '\144' + chr(101))('\165' + '\x74' + '\x66' + chr(0b1011 + 0o42) + chr(1270 - 1214)): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xca\x06\x08U\xfe\x88TM(\xda\x01\xc6'), '\144' + chr(9744 - 9643) + chr(0b111110 + 0o45) + '\157' + chr(0b1100100) + '\145')('\x75' + chr(5859 - 5743) + chr(0b111000 + 0o56) + chr(104 - 59) + chr(0b111000))), roI3spqORKae(ES5oEprVxulp(b'\xc5\x08 B'), chr(100) + chr(0b1100101) + chr(0b10000 + 0o123) + chr(0b111100 + 0o63) + chr(100) + chr(101))('\x75' + '\x74' + '\x66' + '\x2d' + '\x38'): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd5\x1e\x16k\xf5\x8e\x14sn\x92e\xfc'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\xd6\x12!N\xd7'), '\x64' + chr(0b1100101) + chr(0b111100 + 0o47) + chr(111) + chr(0b100100 + 0o100) + chr(0b100001 + 0o104))(chr(6042 - 5925) + chr(116) + chr(9686 - 9584) + chr(0b100001 + 0o14) + chr(2160 - 2104)): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xce5'}\xdf\x8d]5Z\x970\xcb"), chr(0b1001110 + 0o26) + '\x65' + '\143' + '\157' + chr(0b111100 + 0o50) + '\145')(chr(117) + '\164' + chr(102) + '\x2d' + '\x38'))}
fedora-infra/fedora-messaging
fedora_messaging/api.py
_check_callback
def _check_callback(callback): """ Turns a callback that is potentially a class into a callable object. Args: callback (object): An object that might be a class, method, or function. if the object is a class, this creates an instance of it. Raises: ValueError: If an instance can't be created or it isn't a callable object. TypeError: If the class requires arguments to be instantiated. Returns: callable: A callable object suitable for use as the consumer callback. """ # If the callback is a class, create an instance of it first if inspect.isclass(callback): callback_object = callback() if not callable(callback_object): raise ValueError( "Callback must be a class that implements __call__ or a function." ) elif callable(callback): callback_object = callback else: raise ValueError( "Callback must be a class that implements __call__ or a function." ) return callback_object
python
def _check_callback(callback): """ Turns a callback that is potentially a class into a callable object. Args: callback (object): An object that might be a class, method, or function. if the object is a class, this creates an instance of it. Raises: ValueError: If an instance can't be created or it isn't a callable object. TypeError: If the class requires arguments to be instantiated. Returns: callable: A callable object suitable for use as the consumer callback. """ # If the callback is a class, create an instance of it first if inspect.isclass(callback): callback_object = callback() if not callable(callback_object): raise ValueError( "Callback must be a class that implements __call__ or a function." ) elif callable(callback): callback_object = callback else: raise ValueError( "Callback must be a class that implements __call__ or a function." ) return callback_object
[ "def", "_check_callback", "(", "callback", ")", ":", "# If the callback is a class, create an instance of it first", "if", "inspect", ".", "isclass", "(", "callback", ")", ":", "callback_object", "=", "callback", "(", ")", "if", "not", "callable", "(", "callback_object", ")", ":", "raise", "ValueError", "(", "\"Callback must be a class that implements __call__ or a function.\"", ")", "elif", "callable", "(", "callback", ")", ":", "callback_object", "=", "callback", "else", ":", "raise", "ValueError", "(", "\"Callback must be a class that implements __call__ or a function.\"", ")", "return", "callback_object" ]
Turns a callback that is potentially a class into a callable object. Args: callback (object): An object that might be a class, method, or function. if the object is a class, this creates an instance of it. Raises: ValueError: If an instance can't be created or it isn't a callable object. TypeError: If the class requires arguments to be instantiated. Returns: callable: A callable object suitable for use as the consumer callback.
[ "Turns", "a", "callback", "that", "is", "potentially", "a", "class", "into", "a", "callable", "object", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/api.py#L34-L63
train
Checks if a callback is potentially a class and creates an instance of it.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPt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EhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b10011 + 0o40) + chr(0b11001 + 0o30) + chr(0b110101), 53865 - 53857), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(0b100100 + 0o23) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1010011 + 0o34) + chr(50) + chr(0b1101 + 0o46), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\x35' + chr(1045 - 997), 0o10), nzTpIcepk0o8('\060' + chr(0b101 + 0o152) + '\062' + chr(0b110010) + '\x31', 0b1000), nzTpIcepk0o8(chr(1968 - 1920) + '\x6f' + chr(699 - 648) + chr(0b110011) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b1001 + 0o51) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1053 - 1004) + chr(2197 - 2145) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(0b1100001 + 0o16) + chr(518 - 469) + chr(53) + chr(0b100101 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + '\x34' + chr(0b110100 + 0o3), 53103 - 53095), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b111001 + 0o66) + chr(54) + chr(52), 48992 - 48984), nzTpIcepk0o8('\060' + '\157' + '\061' + '\x31' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + chr(51) + '\x32' + '\x33', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101101 + 0o6) + chr(0b1101 + 0o45) + chr(0b101101 + 0o4), 0o10), nzTpIcepk0o8(chr(48) + chr(4598 - 4487) + '\061' + chr(53) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1076 - 1028) + '\x6f' + chr(0b110010) + chr(2690 - 2636) + chr(0b110100), 11138 - 11130), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001 + 0o3) + chr(1542 - 1494), 60853 - 60845), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(53) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(50) + '\064' + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + chr(0b110001) + chr(1106 - 1054) + chr(52), 8159 - 8151), nzTpIcepk0o8('\x30' + '\157' + '\067' + chr(0b100011 + 0o17), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10111 + 0o35) + chr(54), 30569 - 30561), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\x35' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101001 + 0o106) + chr(867 - 816) + chr(0b110001) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(2273 - 2222) + '\067' + '\x30', 63169 - 63161), nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + '\x36' + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(837 - 788) + chr(1139 - 1090), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(929 - 876) + chr(651 - 599), ord("\x08")), nzTpIcepk0o8(chr(2272 - 2224) + chr(8242 - 8131) + '\063' + chr(0b110001) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(437 - 326) + '\062' + chr(168 - 115) + chr(0b101001 + 0o16), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9960 - 9849) + chr(0b110010) + chr(54) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(4909 - 4798) + chr(2059 - 2010) + '\061' + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + chr(904 - 855) + '\x37', 0b1000), nzTpIcepk0o8(chr(603 - 555) + chr(0b1101111) + '\x32' + '\065' + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(0b111101 + 0o62) + chr(0b110001) + '\061' + chr(0b110001 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(4414 - 4303) + chr(1726 - 1675) + '\x35' + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101010 + 0o7) + chr(0b1101 + 0o51) + chr(0b11111 + 0o22), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(8341 - 8230) + '\x33' + chr(55) + chr(1479 - 1424), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b110010) + chr(0b11001 + 0o27) + chr(0b110010 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11470 - 11359) + chr(0b110101) + '\x30', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(0b100001 + 0o24) + chr(0b1011 + 0o45), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe3'), '\x64' + chr(101) + chr(8434 - 8335) + chr(0b100101 + 0o112) + chr(100) + chr(2709 - 2608))('\x75' + chr(0b1110100) + chr(102) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qjWXloxbT9oU(jG5KU4UUGnk5): if roI3spqORKae(fqyA_Zm6qdLB, roI3spqORKae(ES5oEprVxulp(b"\xa4\xcep\xc4\xf0\xab'"), '\x64' + '\145' + chr(0b1100011) + chr(111) + chr(4582 - 4482) + '\145')(chr(0b1000000 + 0o65) + chr(116) + '\x66' + '\x2d' + chr(0b1 + 0o67)))(jG5KU4UUGnk5): R3Bb1d3kFEz9 = jG5KU4UUGnk5() if not typojWN5Phrq(R3Bb1d3kFEz9): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\x8e\xdc\x7f\xc4\xf3\xb97\x0eLJA9\xa7\xf1\r\xd1\x00K\x85\x07VG\x9a\xbf\xd8G\xe1\x8d\xbd\x8f\xd8'\x7f\xc6+\x83\x14\x91\xf2[\xed\xe2L\xcb\xf0\xb48:3\x07[8\xf3\xb0O\xd2UD\xc6\x10SI\x87\xe2"), '\144' + chr(101) + chr(3463 - 3364) + chr(111) + chr(0b101111 + 0o65) + '\x65')('\x75' + chr(0b1110100) + chr(102) + '\055' + '\x38')) elif typojWN5Phrq(jG5KU4UUGnk5): R3Bb1d3kFEz9 = jG5KU4UUGnk5 else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\x8e\xdc\x7f\xc4\xf3\xb97\x0eLJA9\xa7\xf1\r\xd1\x00K\x85\x07VG\x9a\xbf\xd8G\xe1\x8d\xbd\x8f\xd8'\x7f\xc6+\x83\x14\x91\xf2[\xed\xe2L\xcb\xf0\xb48:3\x07[8\xf3\xb0O\xd2UD\xc6\x10SI\x87\xe2"), chr(100) + chr(101) + chr(8788 - 8689) + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(116) + chr(0b100101 + 0o101) + chr(0b101101) + chr(3002 - 2946))) return R3Bb1d3kFEz9
fedora-infra/fedora-messaging
fedora_messaging/api.py
twisted_consume
def twisted_consume(callback, bindings=None, queues=None): """ Start a consumer using the provided callback and run it using the Twisted event loop (reactor). .. note:: Callbacks run in a Twisted-managed thread pool using the :func:`twisted.internet.threads.deferToThread` API to avoid them blocking the event loop. If you wish to use Twisted APIs in your callback you must use the :func:`twisted.internet.threads.blockingCallFromThread` or :class:`twisted.internet.interfaces.IReactorFromThreads` APIs. This API expects the caller to start the reactor. Args: callback (callable): A callable object that accepts one positional argument, a :class:`.Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queue to declare and consume from. Each key in this dictionary should be a queue name to declare, and each value should be a dictionary with the "durable", "auto_delete", "exclusive", and "arguments" keys. Returns: twisted.internet.defer.Deferred: A deferred that fires with the list of one or more :class:`.Consumer` objects. Each consumer object has a :attr:`.Consumer.result` instance variable that is a Deferred that fires or errors when the consumer halts. Note that this API is meant to survive network problems, so consuming will continue until :meth:`.Consumer.cancel` is called or a fatal server error occurs. The deferred returned by this function may error back with a :class:`fedora_messaging.exceptions.BadDeclaration` if queues or bindings cannot be declared on the broker, a :class:`fedora_messaging.exceptions.PermissionException` if the user doesn't have access to the queue, or :class:`fedora_messaging.exceptions.ConnectionException` if the TLS or AMQP handshake fails. """ if isinstance(bindings, dict): bindings = [bindings] callback = _check_callback(callback) global _twisted_service if _twisted_service is None: _twisted_service = service.FedoraMessagingServiceV2(config.conf["amqp_url"]) reactor.callWhenRunning(_twisted_service.startService) # Twisted is killing the underlying connection before stopService gets # called, so we need to add it as a pre-shutdown event to gracefully # finish up messages in progress. reactor.addSystemEventTrigger( "before", "shutdown", _twisted_service.stopService ) return _twisted_service._service.factory.consume(callback, bindings, queues)
python
def twisted_consume(callback, bindings=None, queues=None): """ Start a consumer using the provided callback and run it using the Twisted event loop (reactor). .. note:: Callbacks run in a Twisted-managed thread pool using the :func:`twisted.internet.threads.deferToThread` API to avoid them blocking the event loop. If you wish to use Twisted APIs in your callback you must use the :func:`twisted.internet.threads.blockingCallFromThread` or :class:`twisted.internet.interfaces.IReactorFromThreads` APIs. This API expects the caller to start the reactor. Args: callback (callable): A callable object that accepts one positional argument, a :class:`.Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queue to declare and consume from. Each key in this dictionary should be a queue name to declare, and each value should be a dictionary with the "durable", "auto_delete", "exclusive", and "arguments" keys. Returns: twisted.internet.defer.Deferred: A deferred that fires with the list of one or more :class:`.Consumer` objects. Each consumer object has a :attr:`.Consumer.result` instance variable that is a Deferred that fires or errors when the consumer halts. Note that this API is meant to survive network problems, so consuming will continue until :meth:`.Consumer.cancel` is called or a fatal server error occurs. The deferred returned by this function may error back with a :class:`fedora_messaging.exceptions.BadDeclaration` if queues or bindings cannot be declared on the broker, a :class:`fedora_messaging.exceptions.PermissionException` if the user doesn't have access to the queue, or :class:`fedora_messaging.exceptions.ConnectionException` if the TLS or AMQP handshake fails. """ if isinstance(bindings, dict): bindings = [bindings] callback = _check_callback(callback) global _twisted_service if _twisted_service is None: _twisted_service = service.FedoraMessagingServiceV2(config.conf["amqp_url"]) reactor.callWhenRunning(_twisted_service.startService) # Twisted is killing the underlying connection before stopService gets # called, so we need to add it as a pre-shutdown event to gracefully # finish up messages in progress. reactor.addSystemEventTrigger( "before", "shutdown", _twisted_service.stopService ) return _twisted_service._service.factory.consume(callback, bindings, queues)
[ "def", "twisted_consume", "(", "callback", ",", "bindings", "=", "None", ",", "queues", "=", "None", ")", ":", "if", "isinstance", "(", "bindings", ",", "dict", ")", ":", "bindings", "=", "[", "bindings", "]", "callback", "=", "_check_callback", "(", "callback", ")", "global", "_twisted_service", "if", "_twisted_service", "is", "None", ":", "_twisted_service", "=", "service", ".", "FedoraMessagingServiceV2", "(", "config", ".", "conf", "[", "\"amqp_url\"", "]", ")", "reactor", ".", "callWhenRunning", "(", "_twisted_service", ".", "startService", ")", "# Twisted is killing the underlying connection before stopService gets", "# called, so we need to add it as a pre-shutdown event to gracefully", "# finish up messages in progress.", "reactor", ".", "addSystemEventTrigger", "(", "\"before\"", ",", "\"shutdown\"", ",", "_twisted_service", ".", "stopService", ")", "return", "_twisted_service", ".", "_service", ".", "factory", ".", "consume", "(", "callback", ",", "bindings", ",", "queues", ")" ]
Start a consumer using the provided callback and run it using the Twisted event loop (reactor). .. note:: Callbacks run in a Twisted-managed thread pool using the :func:`twisted.internet.threads.deferToThread` API to avoid them blocking the event loop. If you wish to use Twisted APIs in your callback you must use the :func:`twisted.internet.threads.blockingCallFromThread` or :class:`twisted.internet.interfaces.IReactorFromThreads` APIs. This API expects the caller to start the reactor. Args: callback (callable): A callable object that accepts one positional argument, a :class:`.Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queue to declare and consume from. Each key in this dictionary should be a queue name to declare, and each value should be a dictionary with the "durable", "auto_delete", "exclusive", and "arguments" keys. Returns: twisted.internet.defer.Deferred: A deferred that fires with the list of one or more :class:`.Consumer` objects. Each consumer object has a :attr:`.Consumer.result` instance variable that is a Deferred that fires or errors when the consumer halts. Note that this API is meant to survive network problems, so consuming will continue until :meth:`.Consumer.cancel` is called or a fatal server error occurs. The deferred returned by this function may error back with a :class:`fedora_messaging.exceptions.BadDeclaration` if queues or bindings cannot be declared on the broker, a :class:`fedora_messaging.exceptions.PermissionException` if the user doesn't have access to the queue, or :class:`fedora_messaging.exceptions.ConnectionException` if the TLS or AMQP handshake fails.
[ "Start", "a", "consumer", "using", "the", "provided", "callback", "and", "run", "it", "using", "the", "Twisted", "event", "loop", "(", "reactor", ")", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/api.py#L66-L121
train
Start a consumer using the provided callback and run it using the Twisted - managed thread pool.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc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ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110110) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\064' + '\x30', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101011 + 0o7) + '\061' + chr(0b11100 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(1467 - 1419) + '\157' + chr(0b10110 + 0o35) + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(1327 - 1216) + '\x32' + '\x30' + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8526 - 8415) + '\x32' + chr(0b110000) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(2165 - 2117) + chr(0b1010100 + 0o33) + '\x32' + chr(0b100000 + 0o20) + '\064', 8), nzTpIcepk0o8('\x30' + chr(8287 - 8176) + chr(1189 - 1140) + chr(53) + chr(1855 - 1804), ord("\x08")), nzTpIcepk0o8(chr(60 - 12) + chr(111) + chr(0b1000 + 0o51) + '\060' + chr(386 - 336), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(52) + '\064', 0o10), nzTpIcepk0o8(chr(849 - 801) + chr(0b1100001 + 0o16) + chr(55) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(2242 - 2131) + '\063' + '\x31' + chr(622 - 568), 60665 - 60657), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110111) + chr(1457 - 1404), 0o10), nzTpIcepk0o8(chr(191 - 143) + chr(0b1011011 + 0o24) + chr(978 - 929) + chr(49) + chr(0b101001 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(0b110001) + chr(0b110110) + chr(268 - 216), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100111 + 0o110) + chr(0b101000 + 0o12) + chr(50) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + chr(0b101101 + 0o4) + chr(53) + '\063', 8), nzTpIcepk0o8(chr(48) + chr(2030 - 1919) + chr(0b110011) + '\065' + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9543 - 9432) + chr(0b101010 + 0o10) + chr(0b100101 + 0o17) + chr(0b100100 + 0o16), 27544 - 27536), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(49) + '\x36' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + '\062' + '\x34' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(12199 - 12088) + chr(1435 - 1383) + chr(388 - 336), 0b1000), nzTpIcepk0o8(chr(308 - 260) + chr(1600 - 1489) + '\062' + chr(305 - 251) + chr(0b110001), 46745 - 46737), nzTpIcepk0o8(chr(48) + chr(2589 - 2478) + chr(2469 - 2418) + chr(0b110011) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(1491 - 1440) + chr(0b101010 + 0o13) + chr(1280 - 1231), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b110110) + chr(1186 - 1135), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b1111 + 0o43) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1490 - 1442) + '\x6f' + chr(1014 - 963) + '\x35' + chr(0b110010), 19109 - 19101), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(49) + '\x33' + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(0b110000) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100001 + 0o116) + chr(2447 - 2397) + '\x33', 11864 - 11856), nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + chr(773 - 724) + chr(1882 - 1829), 33398 - 33390), nzTpIcepk0o8('\060' + chr(0b1001011 + 0o44) + chr(0b11100 + 0o27) + chr(0b11010 + 0o31) + chr(0b101101 + 0o6), 41035 - 41027), nzTpIcepk0o8(chr(1218 - 1170) + '\x6f' + chr(0b110001) + '\x37' + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(12267 - 12156) + '\062' + chr(0b110 + 0o53) + '\x33', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1397 - 1348) + '\x36' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(390 - 337) + chr(51), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(50) + chr(0b10100 + 0o37), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1917 - 1868) + chr(0b110111), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10101 + 0o40) + chr(469 - 421), 36983 - 36975)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1c'), '\144' + '\145' + chr(0b1010011 + 0o20) + chr(111) + chr(100) + '\145')(chr(117) + chr(116) + '\x66' + '\055' + chr(0b100000 + 0o30)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def _ybBWpdpN_qV(jG5KU4UUGnk5, Eov4xKwUG62w=None, NJajU877lUB0=None): if suIjIS24Zkqw(Eov4xKwUG62w, znjnJWK64FDT): Eov4xKwUG62w = [Eov4xKwUG62w] jG5KU4UUGnk5 = qjWXloxbT9oU(jG5KU4UUGnk5) global ZWb7WJZ9NGNO if ZWb7WJZ9NGNO is None: ZWb7WJZ9NGNO = s3mEJkwJRqJG.FedoraMessagingServiceV2(kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'SM\xfa\xb1\xd9\xf1\xf6\x07'), chr(7271 - 7171) + '\145' + chr(0b1000100 + 0o37) + chr(6887 - 6776) + chr(100) + '\145')(chr(0b1101000 + 0o15) + chr(169 - 53) + chr(102) + '\x2d' + '\x38')]) roI3spqORKae(GnrY9NlnDSqS, roI3spqORKae(ES5oEprVxulp(b'QA\xe7\xad\xd1\xec\xe1\x05\x10\x11W\xa0\xd4!\x13'), '\144' + chr(8791 - 8690) + chr(0b1100011) + chr(5919 - 5808) + chr(100) + chr(5845 - 5744))(chr(0b1110000 + 0o5) + chr(10896 - 10780) + chr(102) + chr(45) + '\x38'))(roI3spqORKae(ZWb7WJZ9NGNO, roI3spqORKae(ES5oEprVxulp(b'AT\xea\xb3\xf2\xd7\xe1\x194\rZ\xab'), chr(0b10000 + 0o124) + chr(0b1100101) + '\143' + chr(111) + '\144' + '\145')(chr(117) + '\164' + chr(102) + chr(0b101101) + '\x38'))) roI3spqORKae(GnrY9NlnDSqS, roI3spqORKae(ES5oEprVxulp(b'SD\xef\x92\xff\xf7\xf0\x0e/!O\xab\xd3; \xe6\x02\x8f\xc5\x12\xd4'), chr(0b1010011 + 0o21) + '\x65' + '\143' + chr(7359 - 7248) + chr(100) + '\145')(chr(2591 - 2474) + chr(0b1110100) + chr(0b11010 + 0o114) + '\x2d' + chr(0b10010 + 0o46)))(roI3spqORKae(ES5oEprVxulp(b'PE\xed\xae\xf4\xe1'), chr(7724 - 7624) + chr(0b1100101) + chr(0b101001 + 0o72) + chr(0b101101 + 0o102) + chr(0b1010001 + 0o23) + chr(0b1011001 + 0o14))(chr(117) + chr(1232 - 1116) + chr(102) + '\x2d' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'AH\xfe\xb5\xe2\xeb\xf3\x05'), chr(0b111001 + 0o53) + chr(0b1100101) + chr(0b1100011) + chr(0b10 + 0o155) + chr(100) + '\145')('\165' + chr(1812 - 1696) + chr(0b1100110) + chr(0b101101) + chr(0b101111 + 0o11)), roI3spqORKae(ZWb7WJZ9NGNO, roI3spqORKae(ES5oEprVxulp(b'AT\xe4\xb1\xd5\xe1\xf6\x1d+\x07\\'), chr(6215 - 6115) + chr(0b10101 + 0o120) + chr(0b1100000 + 0o3) + chr(0b1101111) + chr(1137 - 1037) + '\145')('\165' + '\x74' + '\x66' + '\055' + '\070'))) return roI3spqORKae(ZWb7WJZ9NGNO._service.factory, roI3spqORKae(ES5oEprVxulp(b'QO\xe5\xb2\xf3\xe9\xe1'), chr(0b110001 + 0o63) + chr(101) + chr(0b101011 + 0o70) + chr(4300 - 4189) + chr(9600 - 9500) + chr(101))('\165' + chr(116) + chr(0b1100110) + chr(0b101 + 0o50) + '\070'))(jG5KU4UUGnk5, Eov4xKwUG62w, NJajU877lUB0)
fedora-infra/fedora-messaging
fedora_messaging/api.py
consume
def consume(callback, bindings=None, queues=None): """ Start a message consumer that executes the provided callback when messages are received. This API is blocking and will not return until the process receives a signal from the operating system. .. warning:: This API is runs the callback in the IO loop thread. This means if your callback could run for a length of time near the heartbeat interval, which is likely on the order of 60 seconds, the broker will kill the TCP connection and the message will be re-delivered on start-up. For now, use the :func:`twisted_consume` API which runs the callback in a thread and continues to handle AMQP events while the callback runs if you have a long-running callback. The callback receives a single positional argument, the message: >>> from fedora_messaging import api >>> def my_callback(message): ... print(message) >>> bindings = [{'exchange': 'amq.topic', 'queue': 'demo', 'routing_keys': ['#']}] >>> queues = { ... "demo": {"durable": False, "auto_delete": True, "exclusive": True, "arguments": {}} ... } >>> api.consume(my_callback, bindings=bindings, queues=queues) If the bindings and queue arguments are not provided, they will be loaded from the configuration. For complete documentation on writing consumers, see the :ref:`consumers` documentation. Args: callback (callable): A callable object that accepts one positional argument, a :class:`Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queue or queues to declare and consume from. This should be in the same format as the :ref:`conf-queues` configuration dictionary where each key is a queue name and each value is a dictionary of settings for that queue. Raises: fedora_messaging.exceptions.HaltConsumer: If the consumer requests that it be stopped. ValueError: If the consumer provide callback that is not a class that implements __call__ and is not a function, if the bindings argument is not a dict or list of dicts with the proper keys, or if the queues argument isn't a dict with the proper keys. """ if isinstance(bindings, dict): bindings = [bindings] if bindings is None: bindings = config.conf["bindings"] else: try: config.validate_bindings(bindings) except exceptions.ConfigurationException as e: raise ValueError(e.message) if queues is None: queues = config.conf["queues"] else: try: config.validate_queues(queues) except exceptions.ConfigurationException as e: raise ValueError(e.message) session = _session.ConsumerSession() session.consume(callback, bindings=bindings, queues=queues)
python
def consume(callback, bindings=None, queues=None): """ Start a message consumer that executes the provided callback when messages are received. This API is blocking and will not return until the process receives a signal from the operating system. .. warning:: This API is runs the callback in the IO loop thread. This means if your callback could run for a length of time near the heartbeat interval, which is likely on the order of 60 seconds, the broker will kill the TCP connection and the message will be re-delivered on start-up. For now, use the :func:`twisted_consume` API which runs the callback in a thread and continues to handle AMQP events while the callback runs if you have a long-running callback. The callback receives a single positional argument, the message: >>> from fedora_messaging import api >>> def my_callback(message): ... print(message) >>> bindings = [{'exchange': 'amq.topic', 'queue': 'demo', 'routing_keys': ['#']}] >>> queues = { ... "demo": {"durable": False, "auto_delete": True, "exclusive": True, "arguments": {}} ... } >>> api.consume(my_callback, bindings=bindings, queues=queues) If the bindings and queue arguments are not provided, they will be loaded from the configuration. For complete documentation on writing consumers, see the :ref:`consumers` documentation. Args: callback (callable): A callable object that accepts one positional argument, a :class:`Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queue or queues to declare and consume from. This should be in the same format as the :ref:`conf-queues` configuration dictionary where each key is a queue name and each value is a dictionary of settings for that queue. Raises: fedora_messaging.exceptions.HaltConsumer: If the consumer requests that it be stopped. ValueError: If the consumer provide callback that is not a class that implements __call__ and is not a function, if the bindings argument is not a dict or list of dicts with the proper keys, or if the queues argument isn't a dict with the proper keys. """ if isinstance(bindings, dict): bindings = [bindings] if bindings is None: bindings = config.conf["bindings"] else: try: config.validate_bindings(bindings) except exceptions.ConfigurationException as e: raise ValueError(e.message) if queues is None: queues = config.conf["queues"] else: try: config.validate_queues(queues) except exceptions.ConfigurationException as e: raise ValueError(e.message) session = _session.ConsumerSession() session.consume(callback, bindings=bindings, queues=queues)
[ "def", "consume", "(", "callback", ",", "bindings", "=", "None", ",", "queues", "=", "None", ")", ":", "if", "isinstance", "(", "bindings", ",", "dict", ")", ":", "bindings", "=", "[", "bindings", "]", "if", "bindings", "is", "None", ":", "bindings", "=", "config", ".", "conf", "[", "\"bindings\"", "]", "else", ":", "try", ":", "config", ".", "validate_bindings", "(", "bindings", ")", "except", "exceptions", ".", "ConfigurationException", "as", "e", ":", "raise", "ValueError", "(", "e", ".", "message", ")", "if", "queues", "is", "None", ":", "queues", "=", "config", ".", "conf", "[", "\"queues\"", "]", "else", ":", "try", ":", "config", ".", "validate_queues", "(", "queues", ")", "except", "exceptions", ".", "ConfigurationException", "as", "e", ":", "raise", "ValueError", "(", "e", ".", "message", ")", "session", "=", "_session", ".", "ConsumerSession", "(", ")", "session", ".", "consume", "(", "callback", ",", "bindings", "=", "bindings", ",", "queues", "=", "queues", ")" ]
Start a message consumer that executes the provided callback when messages are received. This API is blocking and will not return until the process receives a signal from the operating system. .. warning:: This API is runs the callback in the IO loop thread. This means if your callback could run for a length of time near the heartbeat interval, which is likely on the order of 60 seconds, the broker will kill the TCP connection and the message will be re-delivered on start-up. For now, use the :func:`twisted_consume` API which runs the callback in a thread and continues to handle AMQP events while the callback runs if you have a long-running callback. The callback receives a single positional argument, the message: >>> from fedora_messaging import api >>> def my_callback(message): ... print(message) >>> bindings = [{'exchange': 'amq.topic', 'queue': 'demo', 'routing_keys': ['#']}] >>> queues = { ... "demo": {"durable": False, "auto_delete": True, "exclusive": True, "arguments": {}} ... } >>> api.consume(my_callback, bindings=bindings, queues=queues) If the bindings and queue arguments are not provided, they will be loaded from the configuration. For complete documentation on writing consumers, see the :ref:`consumers` documentation. Args: callback (callable): A callable object that accepts one positional argument, a :class:`Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queue or queues to declare and consume from. This should be in the same format as the :ref:`conf-queues` configuration dictionary where each key is a queue name and each value is a dictionary of settings for that queue. Raises: fedora_messaging.exceptions.HaltConsumer: If the consumer requests that it be stopped. ValueError: If the consumer provide callback that is not a class that implements __call__ and is not a function, if the bindings argument is not a dict or list of dicts with the proper keys, or if the queues argument isn't a dict with the proper keys.
[ "Start", "a", "message", "consumer", "that", "executes", "the", "provided", "callback", "when", "messages", "are", "received", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/api.py#L124-L197
train
Start a message consumer that executes the provided callback when messages are received from the operating system.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJR2ssk3y,gCu7Qd75URN1,yfEeqQiUoqWT,zG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Phm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\x32' + chr(1035 - 981) + '\064', 1474 - 1466), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10110 + 0o34) + chr(0b101 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(0b110010 + 0o1) + chr(0b10000 + 0o46) + '\065', 21968 - 21960), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + '\062' + chr(51) + chr(2002 - 1949), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(1056 - 1005) + chr(0b110111) + chr(1143 - 1088), 44421 - 44413), nzTpIcepk0o8('\060' + chr(111) + chr(1628 - 1577) + chr(1644 - 1589), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000010 + 0o55) + chr(51) + chr(0b10001 + 0o43), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(52) + chr(875 - 824), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(53) + '\060', 35521 - 35513), nzTpIcepk0o8(chr(2259 - 2211) + chr(0b1101111) + chr(1542 - 1487) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110111) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(2951 - 2896) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2122 - 2072) + '\064' + chr(1536 - 1481), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(0b110001) + '\x33' + chr(2233 - 2183), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1044 - 990) + chr(54), 11935 - 11927), nzTpIcepk0o8(chr(0b110000) + chr(9837 - 9726) + chr(50) + '\066' + chr(1568 - 1520), 0b1000), nzTpIcepk0o8('\x30' + chr(436 - 325) + chr(49) + '\060' + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + '\x33' + chr(0b110101) + '\x35', 57220 - 57212), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + '\061' + chr(1778 - 1724) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(639 - 591) + chr(0b100110 + 0o111) + chr(487 - 438) + chr(1140 - 1088), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(181 - 131) + chr(0b110001) + '\x30', 0o10), nzTpIcepk0o8(chr(1502 - 1454) + '\157' + chr(0b10010 + 0o40) + chr(0b100000 + 0o24) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x34' + '\x36', 0b1000), nzTpIcepk0o8(chr(613 - 565) + '\x6f' + '\x35' + chr(2137 - 2085), 31535 - 31527), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(298 - 249) + chr(0b110011) + chr(0b100011 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x37' + chr(0b110000), 8), nzTpIcepk0o8('\x30' + '\157' + chr(1224 - 1175) + '\063' + '\061', 0b1000), nzTpIcepk0o8(chr(2046 - 1998) + chr(4595 - 4484) + chr(0b100110 + 0o14) + '\066' + chr(48), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\062' + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110010) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(2484 - 2433) + '\062', 0b1000), nzTpIcepk0o8(chr(1741 - 1693) + chr(111) + '\061' + chr(1531 - 1481), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b10110 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11111 + 0o24) + chr(0b1101 + 0o44) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(5179 - 5068) + '\x35' + chr(52), 8), nzTpIcepk0o8(chr(48) + chr(6016 - 5905) + '\062' + chr(2564 - 2509) + chr(0b110 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(9738 - 9627) + chr(0b101101 + 0o5) + chr(292 - 240) + chr(241 - 188), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(2590 - 2536) + '\066', 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + '\x31' + chr(53) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(7714 - 7603) + chr(0b110001) + chr(1253 - 1200) + chr(0b1110 + 0o45), 39058 - 39050)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + '\065' + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9a'), chr(1947 - 1847) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + '\x65')(chr(9533 - 9416) + '\164' + chr(6460 - 6358) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def X3OqjwXXClZ4(jG5KU4UUGnk5, Eov4xKwUG62w=None, NJajU877lUB0=None): if suIjIS24Zkqw(Eov4xKwUG62w, znjnJWK64FDT): Eov4xKwUG62w = [Eov4xKwUG62w] if Eov4xKwUG62w is None: Eov4xKwUG62w = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xd6x\x9b\xf9\x96q{P'), chr(100) + chr(9803 - 9702) + chr(0b1011100 + 0o7) + '\157' + chr(2955 - 2855) + chr(6768 - 6667))(chr(0b1110101) + chr(13043 - 12927) + '\x66' + '\x2d' + chr(470 - 414))] else: try: roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\xc2p\x99\xf4\x9b~hFw^\xd5\xd6\xc33X\xd70'), '\x64' + chr(0b1100101) + chr(182 - 83) + chr(0b1101111) + '\x64' + chr(6800 - 6699))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)))(Eov4xKwUG62w) except roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\xf7~\x9b\xfb\x96xiQIH\xd5\xd7\xc9\x1fN\xd3&\x9d\x00e\xe7\xcd'), chr(100) + chr(0b1100101) + chr(1474 - 1375) + chr(1040 - 929) + '\144' + chr(101))(chr(117) + chr(0b1110100) + chr(2173 - 2071) + chr(155 - 110) + chr(0b110100 + 0o4))) as wgf0sgcu_xPL: raise WbNHlDKpyPtQ(roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'\xf2z\x86\xd3\xb2W-TwR\xcf\x8e'), chr(100) + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b111011 + 0o52))('\165' + chr(11085 - 10969) + chr(6657 - 6555) + '\x2d' + chr(56)))) if NJajU877lUB0 is None: NJajU877lUB0 = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xc5d\x90\xe8\x9al'), chr(0b11000 + 0o114) + chr(101) + chr(0b110111 + 0o54) + chr(0b1101111) + chr(0b11011 + 0o111) + chr(0b1100101))('\x75' + chr(7881 - 7765) + chr(3418 - 3316) + '\055' + chr(0b111000))] else: try: roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\xc2p\x99\xf4\x9b~hFwM\xc9\xdd\xd2?E'), chr(0b1100100) + '\x65' + chr(0b1010001 + 0o22) + '\157' + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(359 - 314) + chr(0b110011 + 0o5)))(NJajU877lUB0) except roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\xf7~\x9b\xfb\x96xiQIH\xd5\xd7\xc9\x1fN\xd3&\x9d\x00e\xe7\xcd'), chr(0b1001110 + 0o26) + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(12784 - 12668) + chr(1076 - 974) + chr(0b1011 + 0o42) + chr(1093 - 1037))) as wgf0sgcu_xPL: raise WbNHlDKpyPtQ(roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'\xf2z\x86\xd3\xb2W-TwR\xcf\x8e'), chr(8836 - 8736) + chr(1173 - 1072) + chr(0b11011 + 0o110) + chr(0b10011 + 0o134) + chr(100) + '\145')(chr(2871 - 2754) + chr(116) + chr(0b1100001 + 0o5) + chr(0b101101) + chr(0b10111 + 0o41)))) O3QVp9dsdCgx = Vo3yFmDih0Ja.ConsumerSession() roI3spqORKae(O3QVp9dsdCgx, roI3spqORKae(ES5oEprVxulp(b'\xd7~\x9b\xee\x8ary'), '\144' + chr(101) + '\143' + '\x6f' + '\x64' + chr(101))(chr(3180 - 3063) + chr(0b1110100) + chr(102) + chr(207 - 162) + chr(56)))(jG5KU4UUGnk5, bindings=Eov4xKwUG62w, queues=NJajU877lUB0)
fedora-infra/fedora-messaging
fedora_messaging/api.py
publish
def publish(message, exchange=None): """ Publish a message to an exchange. This is a synchronous call, meaning that when this function returns, an acknowledgment has been received from the message broker and you can be certain the message was published successfully. There are some cases where an error occurs despite your message being successfully published. For example, if a network partition occurs after the message is received by the broker. Therefore, you may publish duplicate messages. For complete details, see the :ref:`publishing` documentation. >>> from fedora_messaging import api >>> message = api.Message(body={'Hello': 'world'}, topic='Hi') >>> api.publish(message) If an attempt to publish fails because the broker rejects the message, it is not retried. Connection attempts to the broker can be configured using the "connection_attempts" and "retry_delay" options in the broker URL. See :class:`pika.connection.URLParameters` for details. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` Raises: fedora_messaging.exceptions.PublishReturned: Raised if the broker rejects the message. fedora_messaging.exceptions.ConnectionException: Raised if a connection error occurred before the publish confirmation arrived. fedora_messaging.exceptions.ValidationError: Raised if the message fails validation with its JSON schema. This only depends on the message you are trying to send, the AMQP server is not involved. """ pre_publish_signal.send(publish, message=message) if exchange is None: exchange = config.conf["publish_exchange"] global _session_cache if not hasattr(_session_cache, "session"): _session_cache.session = _session.PublisherSession() try: _session_cache.session.publish(message, exchange=exchange) publish_signal.send(publish, message=message) except exceptions.PublishException as e: publish_failed_signal.send(publish, message=message, reason=e) raise
python
def publish(message, exchange=None): """ Publish a message to an exchange. This is a synchronous call, meaning that when this function returns, an acknowledgment has been received from the message broker and you can be certain the message was published successfully. There are some cases where an error occurs despite your message being successfully published. For example, if a network partition occurs after the message is received by the broker. Therefore, you may publish duplicate messages. For complete details, see the :ref:`publishing` documentation. >>> from fedora_messaging import api >>> message = api.Message(body={'Hello': 'world'}, topic='Hi') >>> api.publish(message) If an attempt to publish fails because the broker rejects the message, it is not retried. Connection attempts to the broker can be configured using the "connection_attempts" and "retry_delay" options in the broker URL. See :class:`pika.connection.URLParameters` for details. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` Raises: fedora_messaging.exceptions.PublishReturned: Raised if the broker rejects the message. fedora_messaging.exceptions.ConnectionException: Raised if a connection error occurred before the publish confirmation arrived. fedora_messaging.exceptions.ValidationError: Raised if the message fails validation with its JSON schema. This only depends on the message you are trying to send, the AMQP server is not involved. """ pre_publish_signal.send(publish, message=message) if exchange is None: exchange = config.conf["publish_exchange"] global _session_cache if not hasattr(_session_cache, "session"): _session_cache.session = _session.PublisherSession() try: _session_cache.session.publish(message, exchange=exchange) publish_signal.send(publish, message=message) except exceptions.PublishException as e: publish_failed_signal.send(publish, message=message, reason=e) raise
[ "def", "publish", "(", "message", ",", "exchange", "=", "None", ")", ":", "pre_publish_signal", ".", "send", "(", "publish", ",", "message", "=", "message", ")", "if", "exchange", "is", "None", ":", "exchange", "=", "config", ".", "conf", "[", "\"publish_exchange\"", "]", "global", "_session_cache", "if", "not", "hasattr", "(", "_session_cache", ",", "\"session\"", ")", ":", "_session_cache", ".", "session", "=", "_session", ".", "PublisherSession", "(", ")", "try", ":", "_session_cache", ".", "session", ".", "publish", "(", "message", ",", "exchange", "=", "exchange", ")", "publish_signal", ".", "send", "(", "publish", ",", "message", "=", "message", ")", "except", "exceptions", ".", "PublishException", "as", "e", ":", "publish_failed_signal", ".", "send", "(", "publish", ",", "message", "=", "message", ",", "reason", "=", "e", ")", "raise" ]
Publish a message to an exchange. This is a synchronous call, meaning that when this function returns, an acknowledgment has been received from the message broker and you can be certain the message was published successfully. There are some cases where an error occurs despite your message being successfully published. For example, if a network partition occurs after the message is received by the broker. Therefore, you may publish duplicate messages. For complete details, see the :ref:`publishing` documentation. >>> from fedora_messaging import api >>> message = api.Message(body={'Hello': 'world'}, topic='Hi') >>> api.publish(message) If an attempt to publish fails because the broker rejects the message, it is not retried. Connection attempts to the broker can be configured using the "connection_attempts" and "retry_delay" options in the broker URL. See :class:`pika.connection.URLParameters` for details. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` Raises: fedora_messaging.exceptions.PublishReturned: Raised if the broker rejects the message. fedora_messaging.exceptions.ConnectionException: Raised if a connection error occurred before the publish confirmation arrived. fedora_messaging.exceptions.ValidationError: Raised if the message fails validation with its JSON schema. This only depends on the message you are trying to send, the AMQP server is not involved.
[ "Publish", "a", "message", "to", "an", "exchange", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/api.py#L200-L250
train
Publish a message to an exchange.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e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Z,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(1863 - 1812) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\066' + '\x32', 4108 - 4100), nzTpIcepk0o8(chr(738 - 690) + chr(0b1101111) + chr(49) + '\066' + chr(0b110100 + 0o2), 0b1000), nzTpIcepk0o8(chr(1043 - 995) + chr(0b1101111) + chr(51) + chr(0b110101) + chr(0b1011 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(314 - 266) + chr(0b1011101 + 0o22) + chr(0b110001) + chr(0b110000) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1957 - 1846) + chr(131 - 82) + chr(413 - 365) + '\060', 33225 - 33217), nzTpIcepk0o8(chr(48) + chr(111) + chr(1222 - 1172) + '\065' + '\x33', 54314 - 54306), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\x31' + chr(0b1000 + 0o57), 0o10), nzTpIcepk0o8('\x30' + chr(11464 - 11353) + chr(49) + chr(0b11 + 0o60) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010 + 0o0) + chr(1231 - 1176) + chr(0b1001 + 0o50), 53808 - 53800), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(1968 - 1918) + chr(732 - 677), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110010) + chr(0b1000 + 0o51), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b1011 + 0o47) + chr(0b10110 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x34' + chr(245 - 192), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\062' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(186 - 75) + '\062' + chr(0b10001 + 0o43) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(1587 - 1532) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(5235 - 5124) + '\063' + chr(178 - 127) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(0b1001 + 0o146) + chr(0b110111) + chr(0b100001 + 0o23), 8), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(0b110001) + chr(0b110010 + 0o5) + chr(50), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(3604 - 3493) + chr(55) + chr(0b101001 + 0o7), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(2456 - 2406) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(55) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + chr(0b100000 + 0o26) + chr(2853 - 2799), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(1727 - 1676) + chr(48) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(1503 - 1455) + chr(0b11000 + 0o127) + '\062' + chr(395 - 344) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(629 - 578) + chr(50) + chr(0b1111 + 0o41), 40923 - 40915), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101110 + 0o4) + '\066' + chr(0b101110 + 0o2), 31857 - 31849), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10111 + 0o32) + '\062' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(11715 - 11604) + chr(1467 - 1417) + '\x35' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1011001 + 0o26) + chr(49) + chr(0b110100) + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(8247 - 8136) + chr(1693 - 1642) + '\x34' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(201 - 153) + chr(5892 - 5781) + '\x37' + '\064', 8), nzTpIcepk0o8(chr(48) + chr(0b101010 + 0o105) + chr(0b100001 + 0o21) + chr(51) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\065' + chr(55), 0b1000), nzTpIcepk0o8(chr(430 - 382) + chr(0b1101111) + '\061' + '\x31' + chr(132 - 80), 0b1000), nzTpIcepk0o8(chr(1189 - 1141) + '\x6f' + chr(0b10111 + 0o32) + '\066', 1437 - 1429), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(0b110110) + chr(0b101010 + 0o14), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(53) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'w'), '\144' + chr(0b1100101) + chr(99) + chr(5150 - 5039) + chr(0b1010010 + 0o22) + chr(0b1100101))(chr(117) + chr(7095 - 6979) + '\x66' + chr(0b1101 + 0o40) + chr(0b110010 + 0o6)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZRkmNLRvN8fl(FksNMH1w_ns6, bxTA8Iugm8rP=None): roI3spqORKae(eGF1LQsAPFkZ, roI3spqORKae(ES5oEprVxulp(b'\x13k\x07\xb1.\x19\xc7\xc2\t\xcbr\xd7'), chr(100) + chr(101) + '\143' + chr(111) + '\x64' + chr(2189 - 2088))(chr(0b1110101) + '\164' + chr(0b1110 + 0o130) + chr(0b101101) + '\x38'))(ZRkmNLRvN8fl, message=FksNMH1w_ns6) if bxTA8Iugm8rP is None: bxTA8Iugm8rP = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b')G\x14\x85,3\xc3\xd09\xc1t\xf9b\x7fB6'), '\144' + '\145' + chr(0b1100011) + chr(111) + '\x64' + '\x65')(chr(0b1101011 + 0o12) + chr(116) + chr(2742 - 2640) + '\x2d' + '\x38')] global iwkqgZdhgWNn if not dRKdVnHPFq7C(iwkqgZdhgWNn, roI3spqORKae(ES5oEprVxulp(b'*W\x05\x9a,/\xc5'), chr(0b1000111 + 0o35) + chr(2071 - 1970) + chr(99) + '\x6f' + chr(0b10100 + 0o120) + '\145')('\165' + '\164' + chr(102) + chr(0b10100 + 0o31) + chr(0b111000))): iwkqgZdhgWNn.O3QVp9dsdCgx = Vo3yFmDih0Ja.PublisherSession() try: roI3spqORKae(iwkqgZdhgWNn.session, roI3spqORKae(ES5oEprVxulp(b'\x03`\x1d\x84\x0b\x0c\xf9\xf9\x12\x81q\xfd'), chr(0b111111 + 0o45) + chr(0b1100101) + chr(99) + chr(0b100101 + 0o112) + '\144' + chr(4517 - 4416))(chr(0b1001100 + 0o51) + chr(0b1110100) + chr(10289 - 10187) + '\x2d' + '\070'))(FksNMH1w_ns6, exchange=bxTA8Iugm8rP) roI3spqORKae(yno8hyKD9tCF, roI3spqORKae(ES5oEprVxulp(b'\x13k\x07\xb1.\x19\xc7\xc2\t\xcbr\xd7'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(100) + '\x65')(chr(1056 - 939) + chr(899 - 783) + '\x66' + '\x2d' + '\x38'))(ZRkmNLRvN8fl, message=FksNMH1w_ns6) except roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\tG\x14\x85,3\xc3\xca$\xdar\xe1wxJ='), '\x64' + chr(3122 - 3021) + '\x63' + '\157' + '\x64' + '\x65')(chr(117) + '\164' + '\x66' + '\x2d' + chr(56))) as wgf0sgcu_xPL: roI3spqORKae(f16LI93dLwUs, roI3spqORKae(ES5oEprVxulp(b'\x13k\x07\xb1.\x19\xc7\xc2\t\xcbr\xd7'), chr(0b111101 + 0o47) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1100110 + 0o17) + '\164' + '\x66' + chr(0b101101) + '\070'))(ZRkmNLRvN8fl, message=FksNMH1w_ns6, reason=wgf0sgcu_xPL) raise
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.buildProtocol
def buildProtocol(self, addr): """Create the Protocol instance. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ self.resetDelay() self.client = self.protocol(self._parameters) self.client.factory = self self.client.ready.addCallback(lambda _: self._on_client_ready()) return self.client
python
def buildProtocol(self, addr): """Create the Protocol instance. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ self.resetDelay() self.client = self.protocol(self._parameters) self.client.factory = self self.client.ready.addCallback(lambda _: self._on_client_ready()) return self.client
[ "def", "buildProtocol", "(", "self", ",", "addr", ")", ":", "self", ".", "resetDelay", "(", ")", "self", ".", "client", "=", "self", ".", "protocol", "(", "self", ".", "_parameters", ")", "self", ".", "client", ".", "factory", "=", "self", "self", ".", "client", ".", "ready", ".", "addCallback", "(", "lambda", "_", ":", "self", ".", "_on_client_ready", "(", ")", ")", "return", "self", ".", "client" ]
Create the Protocol instance. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details.
[ "Create", "the", "Protocol", "instance", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L99-L109
train
Create the Protocol instance.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n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,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + chr(51) + chr(0b101 + 0o57) + chr(0b110111), 48990 - 48982), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\x33' + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1800 - 1750), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101001 + 0o106) + chr(1860 - 1811) + '\x32' + chr(392 - 342), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10110 + 0o131) + chr(0b110001) + chr(0b110101) + chr(105 - 54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(1030 - 978) + chr(51), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(51) + chr(51) + chr(0b100 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(0b110001) + chr(1658 - 1609) + '\x31', 4439 - 4431), nzTpIcepk0o8(chr(1553 - 1505) + chr(2075 - 1964) + '\x31' + '\x34' + chr(1712 - 1664), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(50) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1600 - 1549) + '\062' + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\066' + '\066', 11940 - 11932), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1580 - 1531) + '\x33' + '\065', 33701 - 33693), nzTpIcepk0o8(chr(1986 - 1938) + '\x6f' + chr(2202 - 2151) + '\067' + chr(1451 - 1402), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2216 - 2166) + '\x36' + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10011 + 0o40) + '\063' + chr(0b0 + 0o67), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(10326 - 10215) + '\x37' + chr(1638 - 1589), ord("\x08")), nzTpIcepk0o8(chr(1691 - 1643) + '\x6f' + '\061' + '\x36' + '\066', 8), nzTpIcepk0o8(chr(556 - 508) + chr(0b110111 + 0o70) + '\062' + '\x33' + '\x37', 8), nzTpIcepk0o8(chr(1283 - 1235) + chr(1682 - 1571) + chr(0b110001) + chr(54) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010110 + 0o31) + chr(0b10010 + 0o37) + '\061' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + chr(50) + chr(660 - 612) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(227 - 179) + chr(0b1101111) + chr(50) + chr(0b101001 + 0o15) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11110 + 0o23) + chr(0b1000 + 0o52) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(604 - 554) + '\x32' + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1807 - 1756) + chr(335 - 286) + chr(0b110111), 57888 - 57880), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110110) + chr(54), 8), nzTpIcepk0o8('\060' + chr(5056 - 4945) + chr(0b110110) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011), 58489 - 58481), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + '\062' + chr(399 - 344) + chr(1989 - 1939), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + '\062' + '\x36' + '\x32', 8), nzTpIcepk0o8(chr(461 - 413) + chr(0b1101111) + chr(0b110001) + '\067' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b101101 + 0o4) + chr(0b110011 + 0o1) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + '\x30' + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\x34' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(2128 - 2080) + chr(0b1101111) + '\x32' + chr(0b110011) + chr(2631 - 2579), 0o10), nzTpIcepk0o8(chr(48) + chr(2035 - 1924) + chr(0b101010 + 0o7) + '\x34' + '\x31', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(0b100100 + 0o22) + chr(0b110100), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + '\065' + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc9'), chr(5730 - 5630) + '\x65' + chr(0b1100011) + chr(11975 - 11864) + '\144' + chr(3262 - 3161))(chr(117) + chr(0b11010 + 0o132) + chr(0b1100110) + '\055' + chr(0b1001 + 0o57)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Ra8yM_Nbh_6B(hXMPsSrOQzbh, _m0lLs6iTLa5): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x95\xfaq7\x1f\xe7\xbc%\x01\xe8'), chr(7001 - 6901) + '\x65' + chr(9402 - 9303) + chr(0b100101 + 0o112) + '\x64' + chr(101))(chr(117) + '\164' + chr(138 - 36) + chr(0b11101 + 0o20) + chr(0b11100 + 0o34)))() hXMPsSrOQzbh.SsF372Bi4URj = hXMPsSrOQzbh.Yk6NhCmIsc7f(hXMPsSrOQzbh.bzMAqQSkrKbE) hXMPsSrOQzbh.client._ZrJCmpWM05z = hXMPsSrOQzbh roI3spqORKae(hXMPsSrOQzbh.client.ready, roI3spqORKae(ES5oEprVxulp(b'\x86\xfbf\x11\n\xcf\xb5+\x01\xf2\xbc'), chr(0b1110 + 0o126) + chr(0b1 + 0o144) + chr(0b1100011) + chr(0b1100 + 0o143) + chr(0b1100100) + '\145')(chr(0b100101 + 0o120) + chr(0b1110100) + '\x66' + chr(1693 - 1648) + '\x38'))(lambda zIqcgNgQ9U6F: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb8\xf0l\r\x08\xcf\xb0,\x0e\xe5\x88\x048\x98\xd0\xa6'), '\144' + '\x65' + chr(5600 - 5501) + '\x6f' + '\x64' + chr(0b100011 + 0o102))('\165' + chr(116) + chr(0b1100110) + chr(1505 - 1460) + chr(0b111000)))()) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb4\xecDa\\\x91\x9b T\xc4\x85\x1c'), chr(0b1010111 + 0o15) + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + chr(101))(chr(13156 - 13039) + chr(3253 - 3137) + chr(102) + '\x2d' + '\070'))
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory._on_client_ready
def _on_client_ready(self): """Called when the client is ready to send and receive messages.""" _legacy_twisted_log.msg("Successfully connected to the AMQP broker.") yield self.client.resumeProducing() yield self.client.declare_exchanges(self.exchanges) yield self.client.declare_queues(self.queues) yield self.client.bind_queues(self.bindings) for queue, callback in self.consumers.items(): yield self.client.consume(callback, queue) _legacy_twisted_log.msg("Successfully declared all AMQP objects.") self._client_ready.callback(None)
python
def _on_client_ready(self): """Called when the client is ready to send and receive messages.""" _legacy_twisted_log.msg("Successfully connected to the AMQP broker.") yield self.client.resumeProducing() yield self.client.declare_exchanges(self.exchanges) yield self.client.declare_queues(self.queues) yield self.client.bind_queues(self.bindings) for queue, callback in self.consumers.items(): yield self.client.consume(callback, queue) _legacy_twisted_log.msg("Successfully declared all AMQP objects.") self._client_ready.callback(None)
[ "def", "_on_client_ready", "(", "self", ")", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Successfully connected to the AMQP broker.\"", ")", "yield", "self", ".", "client", ".", "resumeProducing", "(", ")", "yield", "self", ".", "client", ".", "declare_exchanges", "(", "self", ".", "exchanges", ")", "yield", "self", ".", "client", ".", "declare_queues", "(", "self", ".", "queues", ")", "yield", "self", ".", "client", ".", "bind_queues", "(", "self", ".", "bindings", ")", "for", "queue", ",", "callback", "in", "self", ".", "consumers", ".", "items", "(", ")", ":", "yield", "self", ".", "client", ".", "consume", "(", "callback", ",", "queue", ")", "_legacy_twisted_log", ".", "msg", "(", "\"Successfully declared all AMQP objects.\"", ")", "self", ".", "_client_ready", ".", "callback", "(", "None", ")" ]
Called when the client is ready to send and receive messages.
[ "Called", "when", "the", "client", "is", "ready", "to", "send", "and", "receive", "messages", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L112-L124
train
Called when the client is ready to send and receive messages.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZ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MV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2158 - 2110) + chr(0b1101110 + 0o1) + chr(0b101100 + 0o6) + '\x34' + chr(51), 32250 - 32242), nzTpIcepk0o8('\060' + chr(111) + chr(119 - 70) + chr(48) + '\061', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(50) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2135 - 2024) + chr(1000 - 949) + '\x35' + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(1933 - 1879) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + '\x33' + '\063' + chr(0b10011 + 0o35), 20789 - 20781), nzTpIcepk0o8(chr(0b110000) + chr(10540 - 10429) + chr(0b110001) + chr(1107 - 1056), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(49) + chr(52) + chr(51), 51891 - 51883), nzTpIcepk0o8(chr(924 - 876) + chr(11671 - 11560) + chr(500 - 451) + chr(0b110010) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\064' + chr(51), 8), nzTpIcepk0o8('\060' + chr(4494 - 4383) + chr(0b110001) + chr(2207 - 2152) + chr(55), 53170 - 53162), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + chr(51) + chr(0b10101 + 0o33), 38158 - 38150), nzTpIcepk0o8(chr(48) + '\157' + chr(1192 - 1141) + chr(0b110001) + chr(0b1110 + 0o45), 0b1000), nzTpIcepk0o8(chr(1401 - 1353) + chr(111) + chr(0b100 + 0o56) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b110010) + '\066', 0o10), nzTpIcepk0o8(chr(587 - 539) + '\x6f' + '\066' + '\065', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101111 + 0o4) + chr(0b10011 + 0o43) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(2221 - 2172) + '\x37' + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(94 - 41) + chr(0b110000 + 0o7), 64274 - 64266), nzTpIcepk0o8(chr(1911 - 1863) + chr(0b1010100 + 0o33) + '\x31' + '\062' + chr(295 - 241), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(54) + chr(688 - 638), ord("\x08")), nzTpIcepk0o8(chr(1594 - 1546) + '\x6f' + chr(633 - 581) + '\061', 22290 - 22282), nzTpIcepk0o8('\x30' + chr(4123 - 4012) + '\x33' + chr(52) + chr(51), 6371 - 6363), nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + chr(1000 - 950) + chr(49) + '\064', 0b1000), nzTpIcepk0o8(chr(80 - 32) + chr(7294 - 7183) + chr(0b1010 + 0o47) + chr(0b110011) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(48) + '\x33', 49981 - 49973), nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + chr(0b110011) + '\063' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(440 - 392) + chr(111) + '\063' + chr(0b110110) + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1479 - 1428) + '\067' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(704 - 649) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110100 + 0o0) + chr(0b11010 + 0o33), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(2254 - 2203) + chr(0b0 + 0o60) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(1963 - 1914) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11111 + 0o24) + chr(0b110000) + '\060', 0b1000), nzTpIcepk0o8(chr(581 - 533) + chr(9954 - 9843) + chr(0b110001) + chr(985 - 932) + chr(0b100100 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4173 - 4062) + chr(49) + '\060' + '\x35', 18408 - 18400), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101010 + 0o10) + chr(50) + chr(0b100010 + 0o24), 8), nzTpIcepk0o8(chr(711 - 663) + '\157' + '\x33' + chr(0b110101), 45916 - 45908)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b111001 + 0o66) + chr(0b101011 + 0o12) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8d'), chr(100) + chr(0b1011110 + 0o7) + chr(2772 - 2673) + '\x6f' + chr(0b1100100) + chr(1875 - 1774))(chr(117) + '\x74' + '\x66' + chr(0b10101 + 0o30) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def rTUwHHXUzIGQ(hXMPsSrOQzbh): roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'\xd0-1v\x89}\xaen?$g0'), chr(0b110000 + 0o64) + chr(0b1000011 + 0o42) + chr(0b1011011 + 0o10) + chr(0b1101111) + chr(2870 - 2770) + chr(101))('\x75' + chr(0b111000 + 0o74) + '\x66' + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xf046o\x8eF\xabmr\x0f:\x1a_{\xa4y\xf8P\x96\x0e\xca2\xd2U\x8c\xac,\xeb\xba\xd2\xb9tt\x96l\xa2\x1c*\xfdx\xd1o'), chr(5000 - 4900) + '\145' + '\x63' + '\x6f' + chr(7718 - 7618) + '\x65')('\x75' + chr(0b1001011 + 0o51) + chr(6612 - 6510) + '\x2d' + chr(56))) yield roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xd1$&y\x86P\x88yh\x07#\x00\x16v\xac'), chr(100) + '\x65' + '\x63' + '\x6f' + chr(100) + chr(9399 - 9298))(chr(117) + chr(116) + '\146' + '\055' + '\070'))() yield roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xc7$6`\x8aG\xbdTb\x1b5\x0b\x1ev\xacr\xe5'), chr(0b1100100) + '\x65' + chr(0b100001 + 0o102) + '\x6f' + chr(0b111000 + 0o54) + chr(5848 - 5747))(chr(0b1001000 + 0o55) + chr(0b1110100) + '\146' + '\x2d' + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc696d\x8a[\xbfnt'), chr(0b110111 + 0o55) + chr(0b1010 + 0o133) + chr(2470 - 2371) + '\157' + '\144' + chr(9008 - 8907))('\165' + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000)))) yield roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xc7$6`\x8aG\xbdTv\x163\x16\x1ak'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b100010 + 0o102) + chr(101))(chr(4195 - 4078) + '\164' + chr(0b110100 + 0o62) + '\x2d' + chr(0b100 + 0o64)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xed\x0b4f\xbe\r\xef<k6\x14S'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))('\165' + chr(0b1110 + 0o146) + '\146' + '\x2d' + '\x38'))) yield roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xc1(;h\xb4D\xadnr\x06%'), '\x64' + chr(4048 - 3947) + '\x63' + '\157' + chr(100) + '\x65')('\x75' + chr(0b100011 + 0o121) + chr(0b1100110) + chr(0b101 + 0o50) + chr(0b101000 + 0o20)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc1(;h\x82[\xbfx'), '\144' + '\145' + '\143' + chr(111) + '\144' + chr(0b1100101))(chr(117) + chr(116) + chr(102) + chr(45) + chr(0b111000)))) for (iRcFmb17G7aY, jG5KU4UUGnk5) in roI3spqORKae(hXMPsSrOQzbh.consumers, roI3spqORKae(ES5oEprVxulp(b'\xfa\x1e;B\xaeO\x90?4\x15\x0e\n'), chr(628 - 528) + chr(4583 - 4482) + chr(0b1001010 + 0o31) + '\157' + chr(0b1100100) + '\145')(chr(0b1110011 + 0o2) + chr(7598 - 7482) + chr(0b1100110) + chr(1252 - 1207) + chr(56)))(): yield roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xc0.;\x7f\x9eX\xbd'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(7833 - 7732))(chr(0b1110101) + chr(0b1110100) + chr(7985 - 7883) + '\x2d' + chr(0b110 + 0o62)))(jG5KU4UUGnk5, iRcFmb17G7aY) roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'\xd0-1v\x89}\xaen?$g0'), chr(0b100110 + 0o76) + '\145' + chr(0b1100011) + chr(0b111010 + 0o65) + chr(0b1100100) + chr(4186 - 4085))(chr(117) + '\x74' + chr(0b100100 + 0o102) + chr(0b11011 + 0o22) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xf046o\x8eF\xabmr\x0f:\x1a_|\xaet\xfaT\x87\x1f\xcbv\x93M\x8f\xac\x19\xce\x8e\xa2\xd8VG\xac)\xa3\x1a6\xb8'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(111) + chr(0b101110 + 0o66) + chr(0b1100101))('\x75' + chr(116) + '\146' + '\055' + chr(0b111000))) roI3spqORKae(hXMPsSrOQzbh._client_ready, roI3spqORKae(ES5oEprVxulp(b'\xc9\x06`G\xbe\x01\x8d^@\r=V'), chr(4347 - 4247) + chr(101) + chr(2352 - 2253) + chr(0b1101111 + 0o0) + '\144' + chr(4203 - 4102))(chr(0b1110101) + chr(0b100110 + 0o116) + chr(0b1100110) + '\055' + chr(0b111000)))(None)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.clientConnectionLost
def clientConnectionLost(self, connector, reason): """Called when the connection to the broker has been lost. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ if not isinstance(reason.value, error.ConnectionDone): _legacy_twisted_log.msg( "Lost connection to the AMQP broker ({reason})", reason=reason.value, logLevel=logging.WARNING, ) if self._client_ready.called: # Renew the ready deferred, it will callback when the # next connection is ready. self._client_ready = defer.Deferred() protocol.ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
python
def clientConnectionLost(self, connector, reason): """Called when the connection to the broker has been lost. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ if not isinstance(reason.value, error.ConnectionDone): _legacy_twisted_log.msg( "Lost connection to the AMQP broker ({reason})", reason=reason.value, logLevel=logging.WARNING, ) if self._client_ready.called: # Renew the ready deferred, it will callback when the # next connection is ready. self._client_ready = defer.Deferred() protocol.ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
[ "def", "clientConnectionLost", "(", "self", ",", "connector", ",", "reason", ")", ":", "if", "not", "isinstance", "(", "reason", ".", "value", ",", "error", ".", "ConnectionDone", ")", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Lost connection to the AMQP broker ({reason})\"", ",", "reason", "=", "reason", ".", "value", ",", "logLevel", "=", "logging", ".", "WARNING", ",", ")", "if", "self", ".", "_client_ready", ".", "called", ":", "# Renew the ready deferred, it will callback when the", "# next connection is ready.", "self", ".", "_client_ready", "=", "defer", ".", "Deferred", "(", ")", "protocol", ".", "ReconnectingClientFactory", ".", "clientConnectionLost", "(", "self", ",", "connector", ",", "reason", ")" ]
Called when the connection to the broker has been lost. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details.
[ "Called", "when", "the", "connection", "to", "the", "broker", "has", "been", "lost", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L126-L142
train
Called when the connection to the broker has been lost.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlp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ionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101110 + 0o1) + '\x32' + '\061' + chr(0b100110 + 0o21), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(4254 - 4143) + '\061' + '\x35' + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + '\x32' + '\x37' + '\066', ord("\x08")), nzTpIcepk0o8(chr(681 - 633) + '\157' + '\062' + chr(613 - 563) + chr(0b11100 + 0o31), 41024 - 41016), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(2340 - 2291) + '\x33', 37793 - 37785), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(53) + '\x35', 0o10), nzTpIcepk0o8(chr(1462 - 1414) + chr(918 - 807) + chr(664 - 615) + chr(1546 - 1498), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10000 + 0o43) + '\x37' + chr(0b11000 + 0o31), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110111) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(807 - 758) + '\065' + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(9661 - 9550) + chr(0b1100 + 0o53) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(311 - 260) + '\x36' + chr(1466 - 1415), 0o10), nzTpIcepk0o8(chr(994 - 946) + '\157' + '\061' + '\067' + '\x34', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(52) + chr(0b110001), 35907 - 35899), nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + chr(51) + chr(54) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2356 - 2245) + '\061' + '\064' + '\063', 0o10), nzTpIcepk0o8(chr(1820 - 1772) + '\x6f' + chr(1766 - 1717) + chr(0b110101) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10100 + 0o35) + chr(0b100111 + 0o17) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(0b10001 + 0o42) + chr(0b110101) + chr(0b110010), 11202 - 11194), nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\062' + chr(0b11100 + 0o25), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\x31' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(121 - 70) + '\x31' + chr(304 - 249), 29867 - 29859), nzTpIcepk0o8(chr(1379 - 1331) + chr(9957 - 9846) + '\x33' + chr(1554 - 1503) + chr(0b100010 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + chr(0b110011) + chr(49) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110100) + '\x35', 0o10), nzTpIcepk0o8(chr(1392 - 1344) + chr(0b1101111) + chr(2344 - 2290) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b1011 + 0o50) + chr(2797 - 2742) + '\063', 22738 - 22730), nzTpIcepk0o8('\060' + chr(0b1011100 + 0o23) + chr(49) + chr(695 - 643) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + '\x31' + chr(55) + chr(209 - 156), 34986 - 34978), nzTpIcepk0o8('\x30' + '\x6f' + '\x34' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(49) + chr(0b110101) + chr(2128 - 2073), 8), nzTpIcepk0o8(chr(129 - 81) + chr(9722 - 9611) + chr(0b11100 + 0o25) + chr(0b11000 + 0o34) + chr(2195 - 2145), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1000 + 0o147) + '\x32' + '\061' + '\x35', 971 - 963), nzTpIcepk0o8(chr(780 - 732) + chr(111) + chr(0b110010) + '\x36' + chr(0b100 + 0o54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b10011 + 0o36) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x36' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100111 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(558 - 510) + chr(111) + chr(49) + chr(904 - 850) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(324 - 273) + chr(0b11001 + 0o36), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(0b110101) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa1'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(7157 - 7056))(chr(0b100010 + 0o123) + chr(0b1101011 + 0o11) + chr(0b10100 + 0o122) + '\055' + chr(0b100010 + 0o26)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def k1vL8slUahDT(hXMPsSrOQzbh, Bntn9ZcDt14o, RhxFF63tBU4y): if not suIjIS24Zkqw(roI3spqORKae(RhxFF63tBU4y, roI3spqORKae(ES5oEprVxulp(b'\xfa<\x87\xfc\x89\x04\x7f\xc9\x037t\x83'), chr(100) + chr(7894 - 7793) + chr(4261 - 4162) + '\x6f' + '\x64' + chr(10159 - 10058))('\165' + '\x74' + chr(6127 - 6025) + chr(45) + chr(1628 - 1572))), roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b'\xcc\x05\xd0\xfb\xae\x0e|\x90\x15\x06}\x9c\x12D'), chr(100) + chr(101) + chr(99) + chr(0b101111 + 0o100) + chr(0b1100100) + chr(5006 - 4905))(chr(117) + chr(0b1110100) + chr(102) + chr(45) + '\070'))): roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'\xfc\x06\xda\xef\xa9%~\x9cB/\x08\xa0'), chr(0b1100100) + '\145' + chr(1518 - 1419) + chr(10732 - 10621) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(102) + '\x2d' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xc3\x05\xcd\xe1\xeb\x0eg\x97\x14\rZ\x87\x15N\x9aC\x1b\x1f\xca%%\xaa\xf8\x88hf\xabA\x1fQ\x00\t\xe8\xc2\xef\x1ey\x06c\xbe\xfc\x05\xd0\xe8\xe2'), chr(100) + chr(0b1010 + 0o133) + '\143' + chr(0b1001101 + 0o42) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1100110 + 0o16) + chr(1296 - 1194) + '\055' + '\x38'), reason=roI3spqORKae(RhxFF63tBU4y, roI3spqORKae(ES5oEprVxulp(b'\xfa<\x87\xfc\x89\x04\x7f\xc9\x037t\x83'), chr(2724 - 2624) + '\145' + chr(0b11111 + 0o104) + '\157' + chr(5514 - 5414) + '\x65')(chr(8430 - 8313) + chr(3521 - 3405) + '\x66' + chr(0b101101) + chr(0b111000))), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xd8+\xec\xdb\x82#O'), '\144' + chr(101) + chr(99) + '\x6f' + chr(5721 - 5621) + chr(2269 - 2168))(chr(1022 - 905) + chr(116) + '\x66' + chr(0b101101) + chr(0b111000)))) if roI3spqORKae(hXMPsSrOQzbh._client_ready, roI3spqORKae(ES5oEprVxulp(b'\xe8\x0f\xcc\xa4\xfe9x\xae(8P\xbe'), '\144' + '\145' + chr(7745 - 7646) + chr(8963 - 8852) + chr(100) + chr(0b110100 + 0o61))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\x2d' + '\070')): hXMPsSrOQzbh.Dx9faHfyfOGD = hKESOdYBX3yt.Deferred() roI3spqORKae(Yk6NhCmIsc7f.ReconnectingClientFactory, roI3spqORKae(ES5oEprVxulp(b'\xec\x06\xd7\xf0\xa5\x19K\x96\x14\x06\\\x90\x08H\x9b\r#\x1f\x99%'), chr(9968 - 9868) + '\x65' + chr(0b100101 + 0o76) + '\x6f' + chr(3446 - 3346) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(0b10 + 0o53) + chr(56)))(hXMPsSrOQzbh, Bntn9ZcDt14o, RhxFF63tBU4y)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.clientConnectionFailed
def clientConnectionFailed(self, connector, reason): """Called when the client has failed to connect to the broker. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ _legacy_twisted_log.msg( "Connection to the AMQP broker failed ({reason})", reason=reason.value, logLevel=logging.WARNING, ) protocol.ReconnectingClientFactory.clientConnectionFailed( self, connector, reason )
python
def clientConnectionFailed(self, connector, reason): """Called when the client has failed to connect to the broker. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ _legacy_twisted_log.msg( "Connection to the AMQP broker failed ({reason})", reason=reason.value, logLevel=logging.WARNING, ) protocol.ReconnectingClientFactory.clientConnectionFailed( self, connector, reason )
[ "def", "clientConnectionFailed", "(", "self", ",", "connector", ",", "reason", ")", ":", "_legacy_twisted_log", ".", "msg", "(", "\"Connection to the AMQP broker failed ({reason})\"", ",", "reason", "=", "reason", ".", "value", ",", "logLevel", "=", "logging", ".", "WARNING", ",", ")", "protocol", ".", "ReconnectingClientFactory", ".", "clientConnectionFailed", "(", "self", ",", "connector", ",", "reason", ")" ]
Called when the client has failed to connect to the broker. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details.
[ "Called", "when", "the", "client", "has", "failed", "to", "connect", "to", "the", "broker", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L144-L157
train
Called when the client has failed to connect to the broker.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_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j_uC,TVUhqOt5_BbS,WtdkIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110110) + '\062', 39200 - 39192), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(2211 - 2160) + '\x34' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1100 + 0o47) + chr(51) + '\x32', 27264 - 27256), nzTpIcepk0o8(chr(1399 - 1351) + chr(0b1010110 + 0o31) + chr(0b110001) + chr(53) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b110011) + chr(0b10110 + 0o36), 49904 - 49896), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001 + 0o0) + chr(0b110010) + '\x34', 1407 - 1399), nzTpIcepk0o8(chr(48) + chr(0b101101 + 0o102) + '\x34' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b101111 + 0o2) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b101011 + 0o6) + chr(49) + chr(866 - 811), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b1000 + 0o51) + '\064' + '\061', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + '\063' + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(250 - 199) + chr(48) + '\x35', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(7961 - 7850) + chr(50) + chr(79 - 27) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(3803 - 3692) + chr(991 - 941) + '\x33' + chr(355 - 306), 29805 - 29797), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + '\x31' + '\x35' + chr(613 - 564), 0b1000), nzTpIcepk0o8(chr(702 - 654) + '\x6f' + chr(0b11010 + 0o31) + chr(0b10100 + 0o40) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101 + 0o55) + '\x37' + chr(0b101010 + 0o15), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b0 + 0o65) + chr(361 - 313), 27195 - 27187), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(7994 - 7883) + chr(50) + chr(54) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1101 + 0o45) + '\x35' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(2063 - 2015) + chr(0b1101111) + '\x31' + chr(0b110111) + '\x36', 0b1000), nzTpIcepk0o8(chr(1913 - 1865) + '\157' + chr(0b110011) + '\x30' + chr(0b1001 + 0o53), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\063' + chr(169 - 114), 9143 - 9135), nzTpIcepk0o8(chr(1563 - 1515) + chr(111) + chr(0b101 + 0o54) + '\066' + chr(0b1111 + 0o46), 61149 - 61141), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b11000 + 0o127) + chr(1707 - 1655) + chr(50), 58371 - 58363), nzTpIcepk0o8(chr(616 - 568) + chr(111) + chr(0b110010) + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(1598 - 1546) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110110) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b110111) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(808 - 757) + '\066' + chr(0b101010 + 0o15), 29249 - 29241), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + chr(2196 - 2147) + chr(0b110011) + chr(48), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(388 - 339) + chr(49) + chr(0b101110 + 0o6), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(54) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100010 + 0o15) + chr(0b101001 + 0o12) + chr(0b110100) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + '\x32' + chr(0b110000 + 0o2), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\x31' + chr(1041 - 989), 17702 - 17694), nzTpIcepk0o8(chr(64 - 16) + chr(0b10 + 0o155) + '\x37' + chr(2242 - 2194), 51034 - 51026), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000 + 0o3) + chr(52) + chr(0b110100), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\061' + '\x37', 22880 - 22872)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + '\065' + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1c'), chr(0b1100000 + 0o4) + '\x65' + chr(99) + '\157' + '\144' + '\x65')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def HFSAc1zqSQbd(hXMPsSrOQzbh, Bntn9ZcDt14o, RhxFF63tBU4y): roI3spqORKae(OBSCSmmjDohV, roI3spqORKae(ES5oEprVxulp(b'A\x8e\xbe\x15\xfe\x1cU\xeew&i\x96'), '\144' + chr(0b1100101) + chr(0b1010000 + 0o23) + '\157' + '\144' + '\145')('\x75' + '\164' + chr(0b1010101 + 0o21) + chr(0b101 + 0o50) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'q\x8d\xb4\x01\xf97W\xe2 \x0fx\xb1\xcf\xb9\x1d\x8c[\x9fi\xfe\xfb.\xe4\xfd\x07M|\x01\xc5Z\x919%\x9a\x80v\xac\x10\x9f\xfdW\x83\xa9\x00\xf2)\n'), chr(3993 - 3893) + chr(101) + '\143' + '\157' + '\x64' + '\145')(chr(0b1110101) + '\164' + '\x66' + chr(45) + chr(2029 - 1973)), reason=roI3spqORKae(RhxFF63tBU4y, roI3spqORKae(ES5oEprVxulp(b'G\xb4\xe3\x06\xde=T\xbb6>\x15\xb5'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + chr(0b100111 + 0o6) + chr(56))), logLevel=roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'e\xa3\x88!\xd5\x1ad'), chr(0b1100100) + chr(4801 - 4700) + chr(341 - 242) + chr(0b101110 + 0o101) + chr(100) + chr(101))('\165' + chr(116) + chr(0b1011000 + 0o16) + chr(0b101101) + '\070'))) roI3spqORKae(Yk6NhCmIsc7f.ReconnectingClientFactory, roI3spqORKae(ES5oEprVxulp(b'Q\x8e\xb3\n\xf2 `\xe4!\x0f=\xa6\xd4\xf0\x06\x8ax\xdeA\xdf\xcf\x1a'), chr(0b1000101 + 0o37) + chr(0b1100101) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100001 + 0o4))('\x75' + chr(0b1100100 + 0o20) + chr(0b1000110 + 0o40) + chr(45) + '\070'))(hXMPsSrOQzbh, Bntn9ZcDt14o, RhxFF63tBU4y)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.stopTrying
def stopTrying(self): """Stop trying to reconnect to the broker. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ protocol.ReconnectingClientFactory.stopTrying(self) if not self._client_ready.called: self._client_ready.errback( pika.exceptions.AMQPConnectionError( u"Could not connect, reconnection cancelled." ) )
python
def stopTrying(self): """Stop trying to reconnect to the broker. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ protocol.ReconnectingClientFactory.stopTrying(self) if not self._client_ready.called: self._client_ready.errback( pika.exceptions.AMQPConnectionError( u"Could not connect, reconnection cancelled." ) )
[ "def", "stopTrying", "(", "self", ")", ":", "protocol", ".", "ReconnectingClientFactory", ".", "stopTrying", "(", "self", ")", "if", "not", "self", ".", "_client_ready", ".", "called", ":", "self", ".", "_client_ready", ".", "errback", "(", "pika", ".", "exceptions", ".", "AMQPConnectionError", "(", "u\"Could not connect, reconnection cancelled.\"", ")", ")" ]
Stop trying to reconnect to the broker. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details.
[ "Stop", "trying", "to", "reconnect", "to", "the", "broker", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L159-L171
train
Stop trying to reconnect to the broker.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6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lqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + chr(0b11000 + 0o32) + chr(656 - 602), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10620 - 10509) + chr(51) + chr(0b110011) + chr(1202 - 1149), 20353 - 20345), nzTpIcepk0o8(chr(0b110000) + chr(4570 - 4459) + chr(0b0 + 0o61) + chr(54) + chr(2639 - 2585), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b100110 + 0o111) + '\x31' + chr(0b110111) + '\061', 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b101101 + 0o10), ord("\x08")), nzTpIcepk0o8('\060' + chr(562 - 451) + '\061' + chr(0b10100 + 0o42) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\067' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(1163 - 1052) + chr(50) + chr(52) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(50) + chr(0b110001) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1785 - 1737) + '\x6f' + chr(49) + chr(473 - 425) + chr(0b10110 + 0o41), 254 - 246), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11000 + 0o32) + chr(0b11011 + 0o27), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(53) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1335 - 1287) + chr(3634 - 3523) + chr(1377 - 1326) + chr(2531 - 2476) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110111) + chr(322 - 273), 26695 - 26687), nzTpIcepk0o8(chr(0b110000) + chr(0b111101 + 0o62) + '\061' + chr(834 - 781) + chr(53), 0b1000), nzTpIcepk0o8(chr(1382 - 1334) + chr(0b1101111) + '\063' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\x35' + chr(1274 - 1225), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + '\062' + chr(52) + chr(0b100000 + 0o27), 38364 - 38356), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + '\063' + '\x32' + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(954 - 900) + '\064', 22078 - 22070), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(11246 - 11135) + '\062' + chr(49) + '\067', 52430 - 52422), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b110 + 0o57) + chr(0b110010 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(49) + chr(2562 - 2509) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b101101 + 0o6) + chr(0b1011 + 0o45) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(0b110111) + '\x31', 8), nzTpIcepk0o8(chr(48) + chr(0b110010 + 0o75) + chr(1850 - 1801) + chr(0b110011 + 0o3) + chr(52), 8), nzTpIcepk0o8('\060' + chr(4068 - 3957) + chr(0b110010) + chr(0b10100 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3041 - 2930) + chr(0b110001) + chr(0b110101) + '\065', 8), nzTpIcepk0o8(chr(0b110000) + chr(4116 - 4005) + chr(50) + chr(50) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + '\x33' + chr(0b110001) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110100) + chr(0b110001), 36468 - 36460), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101010 + 0o10) + '\x37' + chr(587 - 536), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(908 - 797) + chr(0b110001) + chr(0b110000 + 0o2), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b11 + 0o62), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + '\060' + chr(2780 - 2726), 8), nzTpIcepk0o8(chr(2164 - 2116) + '\x6f' + '\061' + chr(0b10100 + 0o36), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(1690 - 1641) + chr(52) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010011 + 0o34) + chr(711 - 660) + chr(0b100011 + 0o15) + chr(0b100101 + 0o21), 8), nzTpIcepk0o8(chr(48) + chr(9235 - 9124) + chr(421 - 370) + chr(1614 - 1562) + chr(0b1111 + 0o42), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(343 - 290) + chr(1057 - 1009), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'8'), chr(0b1100001 + 0o3) + chr(0b11001 + 0o114) + '\143' + chr(0b1101111) + chr(0b1010010 + 0o22) + chr(6921 - 6820))(chr(0b100000 + 0o125) + chr(116) + chr(0b1100110) + chr(340 - 295) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def jxzk4XslY_Ku(hXMPsSrOQzbh): roI3spqORKae(Yk6NhCmIsc7f.ReconnectingClientFactory, roI3spqORKae(ES5oEprVxulp(b'e\xa9\x19\tQ\x01D\xc8\xe4 '), chr(0b1100100) + '\x65' + chr(6312 - 6213) + '\157' + chr(7016 - 6916) + '\x65')(chr(0b1110101) + chr(3110 - 2994) + chr(3314 - 3212) + '\x2d' + chr(56)))(hXMPsSrOQzbh) if not roI3spqORKae(hXMPsSrOQzbh._client_ready, roI3spqORKae(ES5oEprVxulp(b"q\xb8\x04H0'M\xf6\xd8\x17{c"), chr(0b100001 + 0o103) + chr(101) + '\143' + chr(4772 - 4661) + '\x64' + chr(0b110111 + 0o56))(chr(0b1110101) + chr(11919 - 11803) + chr(102) + chr(0b100011 + 0o12) + chr(56))): roI3spqORKae(hXMPsSrOQzbh._client_ready, roI3spqORKae(ES5oEprVxulp(b'^\xbeGACCx\x91\xfa\x00]o'), chr(7068 - 6968) + '\145' + '\x63' + '\157' + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(1766 - 1650) + chr(1394 - 1292) + '\x2d' + chr(0b101100 + 0o14)))(roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b"W\x90')F\x1cS\xcf\xef$fG\x92\x97(h\x9b\xc8\xa6"), chr(0b1100100) + '\145' + chr(0b1000100 + 0o37) + chr(111) + chr(0b1010010 + 0o22) + chr(101))(chr(117) + chr(116) + chr(3138 - 3036) + chr(271 - 226) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'U\xb2\x03\x15aSS\xce\xfegqA\x93\x97\x08y\x9d\x8b\xf4\x06\xea\xce\x07\xa8\x97\x11v\x19\xfc\xa2\x0f\x9bitk\xa5o\t\xaa\x84r\xf3'), chr(0b1100100) + chr(101) + chr(0b101100 + 0o67) + '\157' + chr(0b1100100) + chr(101))(chr(0b1000110 + 0o57) + '\164' + chr(102) + chr(0b101101) + chr(56))))
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.stopFactory
def stopFactory(self): """Stop the factory. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ if self.client: yield self.client.stopProducing() protocol.ReconnectingClientFactory.stopFactory(self)
python
def stopFactory(self): """Stop the factory. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ if self.client: yield self.client.stopProducing() protocol.ReconnectingClientFactory.stopFactory(self)
[ "def", "stopFactory", "(", "self", ")", ":", "if", "self", ".", "client", ":", "yield", "self", ".", "client", ".", "stopProducing", "(", ")", "protocol", ".", "ReconnectingClientFactory", ".", "stopFactory", "(", "self", ")" ]
Stop the factory. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details.
[ "Stop", "the", "factory", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L174-L182
train
Stop the factory.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,Zt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vXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(5386 - 5275) + chr(809 - 759) + chr(0b110100) + '\x32', 41520 - 41512), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + '\061' + chr(0b110100) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(48) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\066' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b11100 + 0o123) + chr(51) + '\x34' + '\x36', 61237 - 61229), nzTpIcepk0o8(chr(1874 - 1826) + '\x6f' + chr(0b10100 + 0o35) + chr(0b1110 + 0o51) + chr(0b110010 + 0o2), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1284 - 1229) + chr(0b1010 + 0o51), ord("\x08")), nzTpIcepk0o8(chr(2078 - 2030) + '\x6f' + chr(0b101000 + 0o16) + chr(0b101100 + 0o7), 0o10), nzTpIcepk0o8(chr(48) + chr(7444 - 7333) + chr(0b110001 + 0o1) + chr(1441 - 1393) + chr(0b11110 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110000) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5737 - 5626) + chr(132 - 83) + chr(2653 - 2599) + chr(0b101111 + 0o1), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\x31' + '\x30' + '\066', 8), nzTpIcepk0o8(chr(650 - 602) + '\157' + '\x32' + chr(2569 - 2517) + chr(0b100 + 0o55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\062' + chr(0b1100 + 0o47), 23561 - 23553), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b11111 + 0o25) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7417 - 7306) + '\x33' + '\x36' + chr(50), 62439 - 62431), nzTpIcepk0o8(chr(48) + chr(10553 - 10442) + chr(0b11110 + 0o23) + chr(51) + chr(0b110100), 13644 - 13636), nzTpIcepk0o8(chr(500 - 452) + chr(0b1101111) + '\x31' + '\062' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1962 - 1914) + chr(0b1101111) + chr(0b100111 + 0o17) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(1169 - 1121) + chr(111) + chr(51) + chr(0b110111) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b0 + 0o66) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101101 + 0o2) + chr(0b101100 + 0o5) + chr(1154 - 1100) + chr(0b110000), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110111) + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(49) + chr(1242 - 1190), 53533 - 53525), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101111 + 0o3) + chr(1257 - 1205) + '\063', ord("\x08")), nzTpIcepk0o8(chr(1849 - 1801) + chr(111) + '\063' + chr(2699 - 2644) + chr(584 - 530), 32007 - 31999), nzTpIcepk0o8(chr(675 - 627) + '\157' + chr(1735 - 1685) + chr(0b110111) + chr(49), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(0b10111 + 0o32) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1320 - 1270) + '\063' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b110000) + '\063', 44160 - 44152), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + '\062' + chr(0b110000) + '\x30', 30513 - 30505), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110100) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110110) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(3154 - 3043) + chr(0b110011) + '\x35' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(1053 - 998) + chr(1968 - 1916), 8), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(53) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(6252 - 6141) + '\063' + chr(53) + '\x30', 0o10), nzTpIcepk0o8(chr(1240 - 1192) + '\157' + '\x31' + chr(0b110110) + chr(0b11100 + 0o27), 0o10), nzTpIcepk0o8(chr(295 - 247) + chr(12091 - 11980) + '\x32' + chr(52) + '\x37', 51331 - 51323), nzTpIcepk0o8(chr(0b110000) + chr(2626 - 2515) + '\x32' + chr(0b101001 + 0o12) + chr(50), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(53) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8c'), chr(100) + '\x65' + chr(0b10010 + 0o121) + '\x6f' + chr(0b1011101 + 0o7) + chr(0b1011001 + 0o14))('\x75' + chr(639 - 523) + chr(102) + chr(1007 - 962) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def AcajVNT1qTWC(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf1\x17\x00\x85\xd1NyZ\xb6\x93",'), chr(0b1010100 + 0o20) + '\x65' + chr(99) + chr(3021 - 2910) + chr(100) + chr(5646 - 5545))('\x75' + '\164' + chr(0b11001 + 0o115) + chr(45) + chr(2277 - 2221))): yield roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xd1\x10)\xc6\xb6\x0eTW\xf7\xa5\x19(\xc6'), chr(0b1010010 + 0o22) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1010110 + 0o36) + chr(7541 - 7439) + chr(45) + chr(2729 - 2673)))() roI3spqORKae(Yk6NhCmIsc7f.ReconnectingClientFactory, roI3spqORKae(ES5oEprVxulp(b'\xd1\x10)\xc6\xa0\x1dXG\xed\xb4\t'), chr(0b1001000 + 0o34) + chr(0b101000 + 0o75) + chr(9397 - 9298) + '\157' + chr(3810 - 3710) + chr(4027 - 3926))('\165' + chr(13383 - 13267) + chr(7713 - 7611) + '\055' + chr(0b10 + 0o66)))(hXMPsSrOQzbh)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.consume
def consume(self, callback, queue): """ Register a new consumer. This consumer will be configured for every protocol this factory produces so it will be reconfigured on network failures. If a connection is already active, the consumer will be added to it. Args: callback (callable): The callback to invoke when a message arrives. queue (str): The name of the queue to consume from. """ self.consumers[queue] = callback if self._client_ready.called: return self.client.consume(callback, queue)
python
def consume(self, callback, queue): """ Register a new consumer. This consumer will be configured for every protocol this factory produces so it will be reconfigured on network failures. If a connection is already active, the consumer will be added to it. Args: callback (callable): The callback to invoke when a message arrives. queue (str): The name of the queue to consume from. """ self.consumers[queue] = callback if self._client_ready.called: return self.client.consume(callback, queue)
[ "def", "consume", "(", "self", ",", "callback", ",", "queue", ")", ":", "self", ".", "consumers", "[", "queue", "]", "=", "callback", "if", "self", ".", "_client_ready", ".", "called", ":", "return", "self", ".", "client", ".", "consume", "(", "callback", ",", "queue", ")" ]
Register a new consumer. This consumer will be configured for every protocol this factory produces so it will be reconfigured on network failures. If a connection is already active, the consumer will be added to it. Args: callback (callable): The callback to invoke when a message arrives. queue (str): The name of the queue to consume from.
[ "Register", "a", "new", "consumer", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L184-L198
train
Register a new consumer.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8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UMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(1237 - 1126) + '\063' + chr(0b11100 + 0o33) + chr(0b1011 + 0o53), 60444 - 60436), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\x31' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + '\x31' + '\065' + chr(1998 - 1947), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111101 + 0o62) + chr(822 - 773) + '\067' + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b100000 + 0o117) + chr(0b110001) + '\x33' + chr(0b101110 + 0o5), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(1509 - 1460) + chr(0b110101), 41577 - 41569), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + '\062' + '\x30' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + '\x33' + chr(1567 - 1516) + '\061', 40500 - 40492), nzTpIcepk0o8(chr(48) + chr(1243 - 1132) + '\x32' + chr(0b110011 + 0o1) + '\062', 18786 - 18778), nzTpIcepk0o8(chr(2280 - 2232) + chr(0b1101111) + '\x33' + chr(2823 - 2769) + chr(2351 - 2298), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7573 - 7462) + '\062' + chr(1066 - 1013), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(656 - 605) + chr(0b110010) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\066', 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1010 + 0o145) + chr(320 - 271) + chr(49) + chr(53), 33123 - 33115), nzTpIcepk0o8('\060' + chr(7411 - 7300) + chr(0b1010 + 0o51) + '\062' + chr(800 - 751), 32233 - 32225), nzTpIcepk0o8('\060' + chr(8562 - 8451) + chr(0b11001 + 0o30) + chr(1206 - 1158) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(48) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(49) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x36' + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(4755 - 4644) + '\x31' + chr(136 - 85) + chr(0b110111), 28114 - 28106), nzTpIcepk0o8(chr(1008 - 960) + chr(11361 - 11250) + chr(50) + chr(0b110000) + chr(246 - 191), 8), nzTpIcepk0o8(chr(0b110000) + chr(3763 - 3652) + chr(0b110010) + chr(1049 - 996) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + '\x34' + chr(0b0 + 0o65), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(100 - 51) + chr(2463 - 2408), 0b1000), nzTpIcepk0o8(chr(859 - 811) + chr(0b1011101 + 0o22) + '\x32' + '\065' + chr(0b0 + 0o63), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110 + 0o54) + chr(0b110010) + chr(690 - 639), 37824 - 37816), nzTpIcepk0o8(chr(1670 - 1622) + chr(11923 - 11812) + chr(2120 - 2071) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1056 - 945) + chr(0b110110) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(2314 - 2265) + chr(0b11 + 0o56), 0o10), nzTpIcepk0o8(chr(1209 - 1161) + chr(111) + '\x31' + '\067', 8), nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + '\x31' + '\062' + chr(0b11101 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(1564 - 1516) + chr(0b1101111) + '\x31' + chr(48) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(2106 - 2052) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\x33' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010 + 0o0) + '\x30', 9380 - 9372), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1010 + 0o51) + '\064', 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(51) + chr(0b100110 + 0o16) + chr(0b10100 + 0o35), 0b1000), nzTpIcepk0o8(chr(2005 - 1957) + chr(10359 - 10248) + chr(1126 - 1073) + chr(518 - 469), 24570 - 24562), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + '\062' + chr(0b110001 + 0o5) + chr(0b11110 + 0o22), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1122 - 1074) + chr(0b1101111) + chr(53) + '\x30', 3008 - 3000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd0'), chr(0b10000 + 0o124) + '\145' + chr(0b1010011 + 0o20) + '\x6f' + chr(0b1001011 + 0o31) + chr(0b1100101))(chr(117) + chr(0b1010011 + 0o41) + chr(3079 - 2977) + chr(0b10010 + 0o33) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def X3OqjwXXClZ4(hXMPsSrOQzbh, jG5KU4UUGnk5, iRcFmb17G7aY): hXMPsSrOQzbh.yRp8ZLirPPOG[iRcFmb17G7aY] = jG5KU4UUGnk5 if roI3spqORKae(hXMPsSrOQzbh._client_ready, roI3spqORKae(ES5oEprVxulp(b'\x99-\x19LnY\xf7\x8e\xf0\xa5|\x9a'), chr(0b10011 + 0o121) + '\x65' + chr(3029 - 2930) + chr(111) + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + '\x2d' + chr(0b111000))): return roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b"\x9d'\x05\x0e.`\xe2"), chr(0b1100100) + chr(0b1000110 + 0o37) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1100 + 0o151) + '\164' + chr(0b101101 + 0o71) + '\055' + chr(0b11111 + 0o31)))(jG5KU4UUGnk5, iRcFmb17G7aY)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.cancel
def cancel(self, queue): """ Cancel the consumer for a queue. This removes the consumer from the list of consumers to be configured for every connection. Args: queue (str): The name of the queue the consumer is subscribed to. Returns: defer.Deferred or None: Either a Deferred that fires when the consumer is canceled, or None if the consumer was already canceled. Wrap the call in :func:`defer.maybeDeferred` to always receive a Deferred. """ try: del self.consumers[queue] except KeyError: pass if self.client: return self.client.cancel(queue)
python
def cancel(self, queue): """ Cancel the consumer for a queue. This removes the consumer from the list of consumers to be configured for every connection. Args: queue (str): The name of the queue the consumer is subscribed to. Returns: defer.Deferred or None: Either a Deferred that fires when the consumer is canceled, or None if the consumer was already canceled. Wrap the call in :func:`defer.maybeDeferred` to always receive a Deferred. """ try: del self.consumers[queue] except KeyError: pass if self.client: return self.client.cancel(queue)
[ "def", "cancel", "(", "self", ",", "queue", ")", ":", "try", ":", "del", "self", ".", "consumers", "[", "queue", "]", "except", "KeyError", ":", "pass", "if", "self", ".", "client", ":", "return", "self", ".", "client", ".", "cancel", "(", "queue", ")" ]
Cancel the consumer for a queue. This removes the consumer from the list of consumers to be configured for every connection. Args: queue (str): The name of the queue the consumer is subscribed to. Returns: defer.Deferred or None: Either a Deferred that fires when the consumer is canceled, or None if the consumer was already canceled. Wrap the call in :func:`defer.maybeDeferred` to always receive a Deferred.
[ "Cancel", "the", "consumer", "for", "a", "queue", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L200-L219
train
Cancels the consumer for a queue.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG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uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2253 - 2205) + '\157' + chr(0b11111 + 0o23) + chr(0b11100 + 0o26), 303 - 295), nzTpIcepk0o8(chr(722 - 674) + chr(8276 - 8165) + '\x37' + chr(646 - 594), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(51) + '\061' + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\063' + chr(0b110110), 23018 - 23010), nzTpIcepk0o8(chr(48) + chr(0b1000110 + 0o51) + chr(1977 - 1928) + '\x33' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\060' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x36' + chr(0b110100), 61131 - 61123), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\x33' + chr(0b110010 + 0o1), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(0b110011) + chr(301 - 250) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + '\x32' + chr(1484 - 1434) + '\063', ord("\x08")), nzTpIcepk0o8(chr(629 - 581) + chr(0b101100 + 0o103) + '\x31' + '\x30' + chr(55), 16029 - 16021), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + chr(53) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\066' + '\x37', 0o10), nzTpIcepk0o8(chr(1000 - 952) + '\x6f' + chr(2363 - 2312) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110010) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1179 - 1131) + chr(0b1010010 + 0o35) + '\062' + chr(0b110011 + 0o2) + chr(0b11010 + 0o27), 13328 - 13320), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b11001 + 0o30) + chr(1785 - 1732) + chr(1405 - 1357), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b1101111) + '\062' + '\x36' + '\x32', 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + '\062' + chr(49) + '\064', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(54) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(0b110011) + chr(0b1000 + 0o51) + chr(0b110111), 56518 - 56510), nzTpIcepk0o8('\060' + chr(7733 - 7622) + chr(0b110111) + '\060', 58562 - 58554), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(51) + chr(1181 - 1128) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\x35' + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1010 + 0o50) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x36' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1911 - 1863) + chr(0b1000011 + 0o54) + chr(49) + chr(2216 - 2167) + '\x37', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\060' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1010010 + 0o35) + '\x31' + chr(0b110110) + chr(52), 50789 - 50781), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(858 - 807) + chr(49) + '\x33', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10010 + 0o37) + '\x35' + '\060', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + chr(50) + chr(1337 - 1286) + chr(2687 - 2632), 0o10), nzTpIcepk0o8(chr(640 - 592) + '\157' + '\x33' + chr(53) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1264 - 1215) + chr(0b101101 + 0o4) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(1867 - 1818) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(1424 - 1313) + chr(50) + '\x35' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(51) + chr(54) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(4496 - 4385) + '\x32' + chr(0b11010 + 0o30) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(1627 - 1516) + chr(446 - 395) + chr(1698 - 1645) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(51) + chr(2162 - 2111), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(8015 - 7904) + chr(53) + chr(1218 - 1170), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'<'), chr(100) + chr(0b1100101) + chr(0b1011101 + 0o6) + chr(0b1101111) + chr(3438 - 3338) + chr(0b1100101))(chr(0b1110101) + chr(13117 - 13001) + chr(0b1000101 + 0o41) + '\055' + chr(1917 - 1861)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XeoIuri11m65(hXMPsSrOQzbh, iRcFmb17G7aY): try: del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'kn\xbaf\x06\xc8]\xe9\x8a\xc3\x08k'), chr(2447 - 2347) + chr(0b11111 + 0o106) + chr(0b1100011) + chr(0b1101111) + chr(953 - 853) + chr(0b111100 + 0o51))(chr(5931 - 5814) + chr(0b111 + 0o155) + chr(0b111011 + 0o53) + chr(0b101101) + chr(56)))[iRcFmb17G7aY] except knUxyjfq07F9: pass if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'AO\x8cmk\xb6v\xf2\xee\xc6\x15F'), '\144' + chr(8351 - 8250) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b1010000 + 0o25))(chr(5446 - 5329) + chr(116) + '\x66' + '\055' + chr(0b11000 + 0o40))): return roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'q]\xa4=9\xe8'), chr(0b1100100) + chr(0b1000001 + 0o44) + chr(99) + chr(0b1101111) + chr(100) + '\x65')(chr(11687 - 11570) + '\164' + '\x66' + '\x2d' + '\x38'))(iRcFmb17G7aY)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactory.publish
def publish(self, message, exchange=None): """ Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. This call will survive connection failures and try until it succeeds or is canceled. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` returns: defer.Deferred: A deferred that fires when the message is published. Raises: PublishReturned: If the published message is rejected by the broker. ConnectionException: If a connection error occurs while publishing. Calling this method again will wait for the next connection and publish when it is available. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges """ exchange = exchange or config.conf["publish_exchange"] while True: client = yield self.whenConnected() try: yield client.publish(message, exchange) break except ConnectionException: continue
python
def publish(self, message, exchange=None): """ Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. This call will survive connection failures and try until it succeeds or is canceled. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` returns: defer.Deferred: A deferred that fires when the message is published. Raises: PublishReturned: If the published message is rejected by the broker. ConnectionException: If a connection error occurs while publishing. Calling this method again will wait for the next connection and publish when it is available. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges """ exchange = exchange or config.conf["publish_exchange"] while True: client = yield self.whenConnected() try: yield client.publish(message, exchange) break except ConnectionException: continue
[ "def", "publish", "(", "self", ",", "message", ",", "exchange", "=", "None", ")", ":", "exchange", "=", "exchange", "or", "config", ".", "conf", "[", "\"publish_exchange\"", "]", "while", "True", ":", "client", "=", "yield", "self", ".", "whenConnected", "(", ")", "try", ":", "yield", "client", ".", "publish", "(", "message", ",", "exchange", ")", "break", "except", "ConnectionException", ":", "continue" ]
Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. This call will survive connection failures and try until it succeeds or is canceled. Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` returns: defer.Deferred: A deferred that fires when the message is published. Raises: PublishReturned: If the published message is rejected by the broker. ConnectionException: If a connection error occurs while publishing. Calling this method again will wait for the next connection and publish when it is available. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges
[ "Publish", "a", ":", "class", ":", "fedora_messaging", ".", "message", ".", "Message", "to", "an", "exchange", "_", "on", "the", "message", "broker", ".", "This", "call", "will", "survive", "connection", "failures", "and", "try", "until", "it", "succeeds", "or", "is", "canceled", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L234-L263
train
Publish a message to an AMQP exchange.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9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dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1008 - 960) + chr(111) + '\061' + chr(49) + chr(0b11101 + 0o25), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\063' + '\064', 0o10), nzTpIcepk0o8(chr(1567 - 1519) + '\157' + chr(0b110011) + chr(0b11100 + 0o31) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(1189 - 1135), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101 + 0o54) + chr(0b110101) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b100000 + 0o22) + chr(610 - 555) + chr(0b100011 + 0o23), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b0 + 0o64) + '\x31', 6481 - 6473), nzTpIcepk0o8(chr(48) + chr(111) + chr(252 - 203) + chr(0b1011 + 0o53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(973 - 924) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(0b11110 + 0o25) + chr(50) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + '\063' + chr(1705 - 1656) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(9715 - 9604) + chr(0b1001 + 0o51) + chr(0b1111 + 0o46) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10011 + 0o37) + chr(1578 - 1529), ord("\x08")), nzTpIcepk0o8(chr(296 - 248) + chr(2690 - 2579) + chr(592 - 541) + '\064' + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\x32' + chr(2484 - 2429), 42969 - 42961), nzTpIcepk0o8(chr(436 - 388) + chr(135 - 24) + chr(0b110011) + chr(51) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1779 - 1731) + '\x6f' + chr(0b10001 + 0o41) + chr(1608 - 1553), ord("\x08")), nzTpIcepk0o8(chr(1406 - 1358) + '\x6f' + chr(2025 - 1974) + '\x36' + chr(513 - 465), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1635 - 1583) + chr(0b110000 + 0o2), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b111100 + 0o63) + '\x33' + chr(1867 - 1818) + chr(777 - 726), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1251 - 1202) + '\067' + chr(575 - 522), 45744 - 45736), nzTpIcepk0o8('\060' + chr(9466 - 9355) + chr(50) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(0b110110) + chr(51), 0o10), nzTpIcepk0o8(chr(705 - 657) + chr(0b100010 + 0o115) + chr(50) + chr(1769 - 1720) + chr(470 - 419), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100100 + 0o113) + chr(0b110011) + chr(0b110100) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\x35' + chr(0b101110 + 0o11), 11095 - 11087), nzTpIcepk0o8(chr(2301 - 2253) + '\157' + chr(0b11001 + 0o30) + chr(0b10010 + 0o42) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + '\064', 0b1000), nzTpIcepk0o8(chr(1597 - 1549) + chr(0b100100 + 0o113) + '\x31' + chr(52) + chr(48), 0b1000), nzTpIcepk0o8(chr(158 - 110) + chr(111) + chr(826 - 777) + '\063', 8), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(261 - 211) + chr(55) + chr(0b110010), 40528 - 40520), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(3743 - 3632) + '\x33' + chr(0b11101 + 0o31) + chr(2395 - 2345), 55611 - 55603), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x37' + chr(0b11110 + 0o24), 0o10), nzTpIcepk0o8(chr(2070 - 2022) + chr(0b1101110 + 0o1) + chr(900 - 848) + chr(49), 8), nzTpIcepk0o8('\060' + '\157' + '\x36' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1315 - 1204) + '\061' + chr(0b110011) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\067' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\x32' + '\x31', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(2290 - 2237) + '\060', 52726 - 52718)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'd'), chr(100) + chr(4818 - 4717) + '\x63' + chr(111) + chr(1214 - 1114) + chr(0b1100101))('\165' + chr(0b1001101 + 0o47) + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZRkmNLRvN8fl(hXMPsSrOQzbh, FksNMH1w_ns6, bxTA8Iugm8rP=None): bxTA8Iugm8rP = bxTA8Iugm8rP or kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b':\xa9\x8db\x05\xcdI(n~\xb5\xa7\xce\x7f\x83\xb2'), chr(3930 - 3830) + '\x65' + chr(0b1100011) + chr(2032 - 1921) + '\144' + chr(0b1100101))(chr(0b1011001 + 0o34) + chr(4280 - 4164) + chr(0b1000000 + 0o46) + chr(45) + chr(1195 - 1139))] while nzTpIcepk0o8(chr(2032 - 1984) + chr(0b1011001 + 0o26) + '\061', 0o10): SsF372Bi4URj = (yield hXMPsSrOQzbh.whenConnected()) try: yield roI3spqORKae(SsF372Bi4URj, roI3spqORKae(ES5oEprVxulp(b'\x10\x8e\x84c"\xf2s\x01E>\xb0\xa3'), chr(820 - 720) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(6712 - 6612) + chr(8996 - 8895))(chr(0b1110101) + chr(116) + '\x66' + chr(1894 - 1849) + chr(0b110100 + 0o4)))(FksNMH1w_ns6, bxTA8Iugm8rP) break except L6C259nNuLMI: continue
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactoryV2.buildProtocol
def buildProtocol(self, addr): """Create the Protocol instance. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ self._client = self.protocol(self._parameters, confirms=self.confirms) self._client.factory = self @defer.inlineCallbacks def on_ready(unused_param=None): """Reset the connection delay when the AMQP handshake is complete.""" _std_log.debug("AMQP handshake completed; connection ready for use") self.resetDelay() self._client_deferred.callback(self._client) self._client_deferred = defer.Deferred() # Restart any consumer from previous connections that wasn't canceled # including queues and bindings, as the queue might not have been durable for consumer, queue, bindings in self._consumers.values(): _std_log.info("Re-registering the %r consumer", consumer) yield self._client.declare_queues([queue]) yield self._client.bind_queues(bindings) yield self._client.consume(consumer.callback, consumer.queue, consumer) def on_ready_errback(failure): """If opening the connection fails or is lost, this errback is called.""" if failure.check(pika.exceptions.AMQPConnectionError, error.ConnectionDone): # In this case the connection failed to open. This will be called # if the TLS handshake goes wrong (likely) and it may be called if # the AMQP handshake fails. It's *probably* a problem with the # credentials. msg = ( "The TCP connection appears to have started, but the TLS or AMQP handshake " "with the broker failed; check your connection and authentication " "parameters and ensure your user has permission to access the vhost" ) wrapped_failure = Failure( exc_value=ConnectionException(reason=msg, original=failure), exc_type=ConnectionException, ) self._client_deferred.errback(wrapped_failure) else: # Some unexpected exception happened _std_log.exception( "The connection failed with an unexpected exception; please report this bug." ) self._client.ready.addCallback(on_ready) self._client.ready.addErrback(on_ready_errback) return self._client
python
def buildProtocol(self, addr): """Create the Protocol instance. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ self._client = self.protocol(self._parameters, confirms=self.confirms) self._client.factory = self @defer.inlineCallbacks def on_ready(unused_param=None): """Reset the connection delay when the AMQP handshake is complete.""" _std_log.debug("AMQP handshake completed; connection ready for use") self.resetDelay() self._client_deferred.callback(self._client) self._client_deferred = defer.Deferred() # Restart any consumer from previous connections that wasn't canceled # including queues and bindings, as the queue might not have been durable for consumer, queue, bindings in self._consumers.values(): _std_log.info("Re-registering the %r consumer", consumer) yield self._client.declare_queues([queue]) yield self._client.bind_queues(bindings) yield self._client.consume(consumer.callback, consumer.queue, consumer) def on_ready_errback(failure): """If opening the connection fails or is lost, this errback is called.""" if failure.check(pika.exceptions.AMQPConnectionError, error.ConnectionDone): # In this case the connection failed to open. This will be called # if the TLS handshake goes wrong (likely) and it may be called if # the AMQP handshake fails. It's *probably* a problem with the # credentials. msg = ( "The TCP connection appears to have started, but the TLS or AMQP handshake " "with the broker failed; check your connection and authentication " "parameters and ensure your user has permission to access the vhost" ) wrapped_failure = Failure( exc_value=ConnectionException(reason=msg, original=failure), exc_type=ConnectionException, ) self._client_deferred.errback(wrapped_failure) else: # Some unexpected exception happened _std_log.exception( "The connection failed with an unexpected exception; please report this bug." ) self._client.ready.addCallback(on_ready) self._client.ready.addErrback(on_ready_errback) return self._client
[ "def", "buildProtocol", "(", "self", ",", "addr", ")", ":", "self", ".", "_client", "=", "self", ".", "protocol", "(", "self", ".", "_parameters", ",", "confirms", "=", "self", ".", "confirms", ")", "self", ".", "_client", ".", "factory", "=", "self", "@", "defer", ".", "inlineCallbacks", "def", "on_ready", "(", "unused_param", "=", "None", ")", ":", "\"\"\"Reset the connection delay when the AMQP handshake is complete.\"\"\"", "_std_log", ".", "debug", "(", "\"AMQP handshake completed; connection ready for use\"", ")", "self", ".", "resetDelay", "(", ")", "self", ".", "_client_deferred", ".", "callback", "(", "self", ".", "_client", ")", "self", ".", "_client_deferred", "=", "defer", ".", "Deferred", "(", ")", "# Restart any consumer from previous connections that wasn't canceled", "# including queues and bindings, as the queue might not have been durable", "for", "consumer", ",", "queue", ",", "bindings", "in", "self", ".", "_consumers", ".", "values", "(", ")", ":", "_std_log", ".", "info", "(", "\"Re-registering the %r consumer\"", ",", "consumer", ")", "yield", "self", ".", "_client", ".", "declare_queues", "(", "[", "queue", "]", ")", "yield", "self", ".", "_client", ".", "bind_queues", "(", "bindings", ")", "yield", "self", ".", "_client", ".", "consume", "(", "consumer", ".", "callback", ",", "consumer", ".", "queue", ",", "consumer", ")", "def", "on_ready_errback", "(", "failure", ")", ":", "\"\"\"If opening the connection fails or is lost, this errback is called.\"\"\"", "if", "failure", ".", "check", "(", "pika", ".", "exceptions", ".", "AMQPConnectionError", ",", "error", ".", "ConnectionDone", ")", ":", "# In this case the connection failed to open. This will be called", "# if the TLS handshake goes wrong (likely) and it may be called if", "# the AMQP handshake fails. It's *probably* a problem with the", "# credentials.", "msg", "=", "(", "\"The TCP connection appears to have started, but the TLS or AMQP handshake \"", "\"with the broker failed; check your connection and authentication \"", "\"parameters and ensure your user has permission to access the vhost\"", ")", "wrapped_failure", "=", "Failure", "(", "exc_value", "=", "ConnectionException", "(", "reason", "=", "msg", ",", "original", "=", "failure", ")", ",", "exc_type", "=", "ConnectionException", ",", ")", "self", ".", "_client_deferred", ".", "errback", "(", "wrapped_failure", ")", "else", ":", "# Some unexpected exception happened", "_std_log", ".", "exception", "(", "\"The connection failed with an unexpected exception; please report this bug.\"", ")", "self", ".", "_client", ".", "ready", ".", "addCallback", "(", "on_ready", ")", "self", ".", "_client", ".", "ready", ".", "addErrback", "(", "on_ready_errback", ")", "return", "self", ".", "_client" ]
Create the Protocol instance. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details.
[ "Create", "the", "Protocol", "instance", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L296-L346
train
Create the Protocol instance.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpu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24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11001 + 0o31) + '\x33' + chr(0b110000 + 0o4), 0o10), nzTpIcepk0o8(chr(1587 - 1539) + chr(111) + chr(0b110010) + chr(55) + chr(1448 - 1400), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(2207 - 2096) + chr(0b110010) + '\067' + chr(0b110101), 13797 - 13789), nzTpIcepk0o8('\060' + '\x6f' + chr(204 - 155) + chr(0b11011 + 0o26) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(783 - 735) + '\x6f' + chr(0b101 + 0o55) + chr(50) + chr(0b101110 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7624 - 7513) + chr(0b10010 + 0o40) + chr(0b110100) + chr(0b110110), 54888 - 54880), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(0b110001) + chr(54), 54415 - 54407), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\067' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + '\061' + chr(0b110000) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(2036 - 1988) + '\x6f' + '\061' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + '\x32' + chr(0b110010) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(49) + chr(52), 19140 - 19132), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b0 + 0o63) + '\x35', 27783 - 27775), nzTpIcepk0o8('\x30' + chr(8076 - 7965) + chr(0b1110 + 0o43) + '\x35' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100011 + 0o114) + '\x32' + chr(1521 - 1473) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\066', 4514 - 4506), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\061' + chr(0b1001 + 0o53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100010 + 0o15) + '\062' + chr(0b10111 + 0o35) + chr(0b100011 + 0o24), 55398 - 55390), nzTpIcepk0o8('\x30' + chr(0b1010101 + 0o32) + chr(0b101100 + 0o11) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110001) + chr(50), 0o10), nzTpIcepk0o8(chr(912 - 864) + '\157' + chr(1461 - 1412) + '\x34', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(2097 - 2048) + '\x36' + chr(53), 0o10), nzTpIcepk0o8(chr(1728 - 1680) + chr(0b1101111) + '\x31' + chr(2473 - 2422) + chr(449 - 394), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(136 - 87) + chr(0b110100) + chr(0b1001 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5973 - 5862) + chr(0b0 + 0o63) + '\x35' + chr(0b10010 + 0o42), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1306 - 1256) + chr(0b10000 + 0o40) + '\062', 4518 - 4510), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10110 + 0o33) + chr(0b11 + 0o60) + chr(380 - 331), 16482 - 16474), nzTpIcepk0o8(chr(48) + '\157' + chr(2538 - 2487) + chr(0b110011) + chr(1058 - 1006), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + chr(51) + '\x36' + '\x33', 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + '\x36' + chr(54), 0b1000), nzTpIcepk0o8(chr(95 - 47) + chr(111) + chr(50) + chr(0b1010 + 0o54) + '\063', 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(6213 - 6102) + chr(52) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100111 + 0o14) + '\060' + '\x33', 63888 - 63880), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + '\063' + chr(0b110010) + chr(55), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(8622 - 8511) + '\x37' + chr(2438 - 2388), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(53) + '\062', 20520 - 20512), nzTpIcepk0o8(chr(0b110000) + chr(8841 - 8730) + chr(0b110001) + chr(0b100000 + 0o23) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b110101) + chr(0b110110), 39312 - 39304), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101010 + 0o14) + chr(0b1 + 0o62), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb2'), chr(0b110010 + 0o62) + '\x65' + chr(99) + chr(0b1101011 + 0o4) + '\x64' + chr(0b1001011 + 0o32))('\x75' + chr(4171 - 4055) + chr(102) + chr(679 - 634) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Ra8yM_Nbh_6B(hXMPsSrOQzbh, _m0lLs6iTLa5): hXMPsSrOQzbh.a2MVq9mfHnY0 = hXMPsSrOQzbh.Yk6NhCmIsc7f(hXMPsSrOQzbh.bzMAqQSkrKbE, confirms=hXMPsSrOQzbh.confirms) hXMPsSrOQzbh._client._ZrJCmpWM05z = hXMPsSrOQzbh @roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\xf5\xd6\xd1#\xff\xc3\xcdsP/h\xf4o\xf6\x1a'), chr(0b11011 + 0o111) + '\x65' + chr(0b0 + 0o143) + chr(111) + '\144' + '\145')(chr(0b111010 + 0o73) + '\164' + chr(0b1100110) + '\055' + chr(0b10010 + 0o46))) def xge4oaMiUEJz(q4fgfN07QBBv=None): roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xfb\xf9\x84\x10\xa8\xc2\xe1$i.O\xcf'), chr(4309 - 4209) + chr(6196 - 6095) + '\x63' + chr(0b1101111) + '\x64' + chr(4714 - 4613))(chr(0b111110 + 0o67) + chr(3486 - 3370) + '\146' + chr(320 - 275) + chr(1514 - 1458)))(roI3spqORKae(ES5oEprVxulp(b'\xdd\xf5\xec\x1a\xb1\xce\xef|X0b\xf4g\xf8I\xe3a!\xd7E\xefx\x10;^\xcc\xe16\xb2\x9d\x13\xd0V\xaa\xb8T\x8a/\xcbR\xf8\xc1\x9d,\xfe\xd4\xaegO&'), chr(0b100101 + 0o77) + '\145' + '\x63' + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(1183 - 1138) + chr(1867 - 1811))) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xee\xdd\xce/\xe5\xe2\xeb~]:'), '\x64' + chr(5398 - 5297) + '\143' + '\x6f' + chr(0b100010 + 0o102) + '\x65')(chr(0b1110101) + '\164' + '\x66' + chr(0b101101) + chr(0b1 + 0o67)))() roI3spqORKae(hXMPsSrOQzbh._client_deferred, roI3spqORKae(ES5oEprVxulp(b'\xf6\xff\x88\x01\xc4\x92\xdbG{-a\xa0'), chr(3782 - 3682) + chr(632 - 531) + chr(0b1011 + 0o130) + chr(2014 - 1903) + chr(0b1100 + 0o130) + chr(0b11000 + 0o115))('\x75' + chr(116) + '\146' + chr(0b101101) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfd\x8a\xf0\x1c\xe0\x9f\xe3tt-S\xa5'), chr(742 - 642) + chr(0b1001000 + 0o35) + '\x63' + chr(111) + chr(9524 - 9424) + chr(101))('\165' + chr(0b101110 + 0o106) + '\146' + chr(0b101101) + chr(56)))) hXMPsSrOQzbh.eDsn6UmXSOXD = hKESOdYBX3yt.Deferred() for (Fz9tLfvnh2vf, iRcFmb17G7aY, Eov4xKwUG62w) in roI3spqORKae(hXMPsSrOQzbh._consumers, roI3spqORKae(ES5oEprVxulp(b'\xdf\xcb\xd2.\xcb\xec\xc6$Dz^\xed'), '\144' + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(116) + '\x66' + chr(0b0 + 0o55) + chr(56)))(): roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xf5\xc0\xf32\xa8\xea\xf9M\r$x\xda'), chr(0b10000 + 0o124) + chr(3866 - 3765) + '\x63' + '\x6f' + chr(0b111 + 0o135) + '\x65')(chr(117) + '\x74' + chr(0b100110 + 0o100) + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xce\xdd\x908\xf4\xc1\xe7aH&x\xfcb\xfaI\xf4f)\x87\x0c\xf8,\x160\x0b\x9f\xf74\xb9\x81'), '\x64' + '\x65' + '\143' + chr(111) + chr(0b1100100) + chr(0b11111 + 0o106))('\x75' + chr(116) + chr(0b1011001 + 0o15) + '\055' + chr(56)), Fz9tLfvnh2vf) yield roI3spqORKae(hXMPsSrOQzbh._client, roI3spqORKae(ES5oEprVxulp(b'\xf8\xdd\xde&\xf0\xd4\xebMM6o\xe0i\xee'), '\144' + '\145' + '\143' + chr(111) + chr(9636 - 9536) + '\x65')(chr(0b1001010 + 0o53) + chr(0b10001 + 0o143) + chr(6274 - 6172) + chr(0b101101) + chr(0b1 + 0o67)))([iRcFmb17G7aY]) yield roI3spqORKae(hXMPsSrOQzbh._client, roI3spqORKae(ES5oEprVxulp(b'\xfe\xd1\xd3.\xce\xd7\xfbwI&y'), chr(100) + chr(0b1100011 + 0o2) + chr(4236 - 4137) + chr(0b1101111) + chr(9688 - 9588) + '\145')('\165' + chr(116) + chr(0b1100110) + '\055' + '\070'))(Eov4xKwUG62w) yield roI3spqORKae(hXMPsSrOQzbh._client, roI3spqORKae(ES5oEprVxulp(b'\xff\xd7\xd39\xe4\xcb\xeb'), '\144' + '\145' + '\x63' + chr(0b11111 + 0o120) + chr(100) + chr(6786 - 6685))('\165' + chr(0b1110100) + chr(0b110011 + 0o63) + '\x2d' + chr(2664 - 2608)))(roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xf6\xff\x88\x01\xc4\x92\xdbG{-a\xa0'), chr(1059 - 959) + chr(0b1100101) + chr(99) + chr(0b1101110 + 0o1) + chr(0b100111 + 0o75) + chr(696 - 595))(chr(0b100101 + 0o120) + chr(0b1110100) + chr(0b1100110) + chr(0b100110 + 0o7) + chr(0b100011 + 0o25))), roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'\xf5\xea\xde\x0c\xfc\xc4\xbf%{tk\xcc'), '\x64' + chr(5789 - 5688) + chr(0b1100011) + '\157' + chr(0b101011 + 0o71) + chr(0b1001100 + 0o31))(chr(0b1110101) + chr(0b1110100) + chr(0b1100100 + 0o2) + '\055' + '\070')), Fz9tLfvnh2vf) def pOV0Jl9hAIwy(DUbr_vQkcSNT): if roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'\xc8\xd9\xd5\x1d\xe0\xef\xbfYO)x\xcf'), chr(0b111 + 0o135) + chr(0b1100101) + chr(0b100011 + 0o100) + chr(7255 - 7144) + chr(0b1100100) + chr(0b111 + 0o136))('\x75' + chr(0b1110100) + '\146' + chr(0b0 + 0o55) + chr(0b101000 + 0o20)))(roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b'\xdd\xf5\xec\x1a\xd2\xc9\xe0|Y ~\xfcc\xf3,\xf2|#\xd5'), chr(0b10011 + 0o121) + chr(101) + chr(99) + chr(111) + chr(0b101110 + 0o66) + chr(9621 - 9520))('\x75' + chr(13317 - 13201) + chr(0b1100110) + '\055' + chr(0b111000))), roI3spqORKae(qi1wipPVvEKd, roI3spqORKae(ES5oEprVxulp(b'\xdf\xd7\xd3$\xf4\xc5\xfa{S-N\xfab\xf8'), '\144' + chr(3096 - 2995) + '\x63' + chr(111) + '\144' + chr(101))(chr(0b1110101) + '\164' + chr(3561 - 3459) + chr(45) + chr(0b111000)))): sldzbHve8G1S = roI3spqORKae(ES5oEprVxulp(b'\xc8\xd0\xd8j\xc5\xe5\xde2_,d\xfbi\xfe\x1d\xe9a"\x87H\xfa|\x10>\x17\x9f\xa2-\xb3\xd3\x1e\xd2T\xa6\xf7I\xde<\xdcG\xf9\xdc\x91j\xf3\xd3\xfa2H+o\xb5X\xd1:\xa0a>\x87h\xc7]%\x7f\r\x8d\xec=\xaf\x9b\x17\xd8G\xe3\xa0S\xde5\x8eG\xf4\xdd\x9d(\xe3\xc9\xe5wNcl\xf4e\xf1\x0c\xe45l\xc4A\xefo\x1e\x7f\x1c\x83\xf7+\xfc\x90\x19\xddL\xa6\xb4N\xc32\xc0\x13\xfd\xd6\xd9j\xf0\xd3\xfazY-~\xfco\xfc\x1d\xe9a"\x87Y\xeb~\x142\x00\x98\xe7+\xaf\xd3\x17\xddF\xe3\xb2T\xd9(\xdcV\xbc\xc1\xd2?\xe3\x86\xfbaY1*\xfdm\xeeI\xf0k>\xca@\xf9\x7f\x1c0\x0b\xcc\xf66\xfc\x92\x15\xd0G\xb0\xa4\x1a\xde5\xcb\x13\xea\xd0\xd29\xe5'), chr(9010 - 8910) + chr(6184 - 6083) + chr(0b11110 + 0o105) + chr(111) + chr(8913 - 8813) + '\x65')('\165' + chr(116) + '\146' + '\055' + chr(0b111000)) G4E_xGSy6zEs = WqTcOGBMJIY7(exc_value=L6C259nNuLMI(reason=sldzbHve8G1S, original=DUbr_vQkcSNT), exc_type=L6C259nNuLMI) roI3spqORKae(hXMPsSrOQzbh._client_deferred, roI3spqORKae(ES5oEprVxulp(b'\xd4\xdb\x8cr\xd7\x96\xcb"L\x04E\xd4'), chr(0b1100100) + chr(0b1100101) + chr(0b110011 + 0o60) + chr(0b1001010 + 0o45) + chr(100) + chr(891 - 790))('\165' + chr(0b100100 + 0o120) + '\x66' + chr(0b100111 + 0o6) + chr(0b101010 + 0o16)))(G4E_xGSy6zEs) else: roI3spqORKae(i0B8OYsfYQtw, roI3spqORKae(ES5oEprVxulp(b'\xee\xdb\xf1+\xdb\xc4\xedXq D\xe3'), '\144' + chr(101) + chr(99) + chr(0b1001000 + 0o47) + '\x64' + '\145')(chr(117) + '\x74' + chr(0b1100110) + chr(0b110 + 0o47) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xc8\xd0\xd8j\xf2\xc9\xe0|Y ~\xfcc\xf3I\xe6o%\xcbL\xee,\x026\x11\x84\xa28\xb2\xd3\x03\xddG\xbb\xa7_\xc9)\xcbW\xbc\xdd\xc5)\xf4\xd6\xfa{S-1\xb5|\xf1\x0c\xe1})\x87[\xef|\x1a-\x11\xcc\xf61\xb5\x80V\xd1W\xa4\xf9'), chr(0b11010 + 0o112) + chr(7371 - 7270) + '\x63' + chr(111) + chr(9274 - 9174) + '\145')(chr(0b110001 + 0o104) + chr(0b1110100) + '\146' + chr(0b101101) + '\x38')) roI3spqORKae(hXMPsSrOQzbh._client.ready, roI3spqORKae(ES5oEprVxulp(b'\xfd\xdc\xd9\t\xf0\xca\xe2p] a'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + '\164' + '\146' + chr(0b1010 + 0o43) + '\x38'))(xge4oaMiUEJz) roI3spqORKae(hXMPsSrOQzbh._client.ready, roI3spqORKae(ES5oEprVxulp(b'\xfd\xdc\xd9\x0f\xe3\xd4\xecs_('), chr(0b1100100) + chr(0b11001 + 0o114) + '\x63' + '\157' + chr(3531 - 3431) + '\x65')(chr(117) + chr(116) + chr(102) + '\055' + chr(0b100 + 0o64)))(pOV0Jl9hAIwy) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfd\x8a\xf0\x1c\xe0\x9f\xe3tt-S\xa5'), chr(0b1010110 + 0o16) + '\145' + chr(0b100010 + 0o101) + chr(9791 - 9680) + chr(2325 - 2225) + chr(0b1100 + 0o131))('\x75' + chr(116) + '\146' + chr(45) + '\x38'))
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactoryV2.stopFactory
def stopFactory(self): """Stop the factory. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ if self._client: yield self._client.halt() protocol.ReconnectingClientFactory.stopFactory(self)
python
def stopFactory(self): """Stop the factory. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details. """ if self._client: yield self._client.halt() protocol.ReconnectingClientFactory.stopFactory(self)
[ "def", "stopFactory", "(", "self", ")", ":", "if", "self", ".", "_client", ":", "yield", "self", ".", "_client", ".", "halt", "(", ")", "protocol", ".", "ReconnectingClientFactory", ".", "stopFactory", "(", "self", ")" ]
Stop the factory. See the documentation of `twisted.internet.protocol.ReconnectingClientFactory` for details.
[ "Stop", "the", "factory", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be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xPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(2829 - 2718) + '\x31' + '\061' + '\061', 40190 - 40182), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(53) + chr(0b11101 + 0o23), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100101 + 0o12) + '\x31' + '\x36' + chr(0b110011), 34052 - 34044), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\060' + chr(1794 - 1739), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x31' + chr(2117 - 2069), 0o10), nzTpIcepk0o8('\060' + chr(7801 - 7690) + chr(0b100010 + 0o20) + '\x32' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(1366 - 1314) + chr(55), 0o10), nzTpIcepk0o8(chr(1748 - 1700) + '\157' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + '\061' + chr(0b110101) + '\061', 27575 - 27567), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1503 - 1449) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b10000 + 0o42) + chr(0b110000) + chr(670 - 620), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10234 - 10123) + chr(368 - 318) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1100 + 0o143) + chr(0b10010 + 0o41) + chr(2179 - 2125) + chr(388 - 336), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110010) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\062' + chr(0b110100) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(1964 - 1853) + chr(53) + chr(0b110110), 65197 - 65189), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(0b11010 + 0o35) + '\064', 0o10), nzTpIcepk0o8(chr(230 - 182) + chr(1579 - 1468) + chr(0b110011) + '\064' + chr(54), 57063 - 57055), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11 + 0o60) + chr(0b110010) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100001 + 0o20) + '\065' + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + '\x31' + chr(0b110011 + 0o1) + chr(0b110010), 46638 - 46630), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(50) + '\066' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + chr(0b10011 + 0o36) + chr(0b110101) + chr(2354 - 2303), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\062' + chr(0b110010 + 0o2), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(742 - 692) + '\x30' + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(3086 - 2975) + chr(0b110010) + chr(0b101 + 0o61) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101010 + 0o7) + '\066' + chr(0b101101 + 0o10), 0b1000), nzTpIcepk0o8(chr(660 - 612) + '\x6f' + chr(0b110011) + '\062' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\x34' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + '\x32' + chr(0b10100 + 0o37) + chr(0b100010 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(1226 - 1178) + chr(0b1101111) + '\061' + chr(0b110100), 37677 - 37669), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(1023 - 971) + '\x36', 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b110110) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2488 - 2438) + chr(0b110000) + chr(0b10011 + 0o44), 8), nzTpIcepk0o8(chr(640 - 592) + chr(0b1101111) + chr(297 - 247) + chr(0b10110 + 0o34), 0b1000), nzTpIcepk0o8('\x30' + chr(12119 - 12008) + chr(279 - 224) + chr(1171 - 1120), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011001 + 0o26) + chr(1554 - 1505) + chr(55) + chr(48), 0o10), nzTpIcepk0o8(chr(1187 - 1139) + chr(111) + chr(49) + chr(1324 - 1276), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110000) + chr(0b1111 + 0o42), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(2223 - 2170) + chr(48), 49935 - 49927)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'g'), chr(2831 - 2731) + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(116) + chr(0b110110 + 0o60) + chr(654 - 609) + chr(2845 - 2789)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def AcajVNT1qTWC(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'(\xdaK%\xf6\xb1\xf8\x01O\x07\xa8\xb2'), chr(0b11100 + 0o110) + chr(0b1001000 + 0o35) + '\x63' + chr(284 - 173) + '\144' + chr(0b110000 + 0o65))(chr(0b1110101) + '\x74' + chr(0b1101 + 0o131) + chr(45) + chr(0b111000))): yield roI3spqORKae(hXMPsSrOQzbh._client, roI3spqORKae(ES5oEprVxulp(b'!\x89j\x07'), '\x64' + '\145' + '\x63' + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + chr(5086 - 4970) + '\x66' + chr(0b101101) + '\x38'))() roI3spqORKae(Yk6NhCmIsc7f.ReconnectingClientFactory, roI3spqORKae(ES5oEprVxulp(b':\x9ci\x03\xc1\xe9\xf6\x13h\x1b\x88'), '\x64' + chr(0b11010 + 0o113) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + chr(116) + chr(0b1100001 + 0o5) + '\055' + chr(0b111000)))(hXMPsSrOQzbh)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactoryV2.when_connected
def when_connected(self): """ Retrieve the currently-connected Protocol, or the next one to connect. Returns: defer.Deferred: A Deferred that fires with a connected :class:`FedoraMessagingProtocolV2` instance. This is similar to the whenConnected method from the Twisted endpoints APIs, which is sadly isn't available before 16.1.0, which isn't available in EL7. """ if self._client and not self._client.is_closed: return defer.succeed(self._client) else: return self._client_deferred
python
def when_connected(self): """ Retrieve the currently-connected Protocol, or the next one to connect. Returns: defer.Deferred: A Deferred that fires with a connected :class:`FedoraMessagingProtocolV2` instance. This is similar to the whenConnected method from the Twisted endpoints APIs, which is sadly isn't available before 16.1.0, which isn't available in EL7. """ if self._client and not self._client.is_closed: return defer.succeed(self._client) else: return self._client_deferred
[ "def", "when_connected", "(", "self", ")", ":", "if", "self", ".", "_client", "and", "not", "self", ".", "_client", ".", "is_closed", ":", "return", "defer", ".", "succeed", "(", "self", ".", "_client", ")", "else", ":", "return", "self", ".", "_client_deferred" ]
Retrieve the currently-connected Protocol, or the next one to connect. Returns: defer.Deferred: A Deferred that fires with a connected :class:`FedoraMessagingProtocolV2` instance. This is similar to the whenConnected method from the Twisted endpoints APIs, which is sadly isn't available before 16.1.0, which isn't available in EL7.
[ "Retrieve", "the", "currently", "-", "connected", "Protocol", "or", "the", "next", "one", "to", "connect", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L359-L373
train
Returns a Deferred that fires with a connectedFedoraMessagingProtocolV2 instance.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,Uti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BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(2133 - 2079) + '\062', ord("\x08")), nzTpIcepk0o8(chr(1569 - 1521) + chr(111) + chr(54) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101 + 0o56) + '\x30' + '\x36', 22658 - 22650), nzTpIcepk0o8(chr(764 - 716) + '\x6f' + chr(0b110011) + chr(54) + chr(1035 - 986), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11010 + 0o31) + '\x37' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(9667 - 9556) + chr(712 - 657), 0b1000), nzTpIcepk0o8(chr(269 - 221) + chr(0b1001101 + 0o42) + chr(0b110001 + 0o2) + chr(102 - 54) + chr(310 - 262), 0o10), nzTpIcepk0o8('\x30' + chr(3165 - 3054) + '\061' + '\x35' + chr(0b110100), 9151 - 9143), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + chr(1587 - 1538) + chr(54) + '\065', 44335 - 44327), nzTpIcepk0o8('\060' + '\157' + '\x35' + chr(0b1110 + 0o44), 33101 - 33093), nzTpIcepk0o8(chr(516 - 468) + chr(7323 - 7212) + '\063' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(49) + '\x37', 47316 - 47308), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + '\x33' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\x33' + '\x30' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1321 - 1273) + '\157' + chr(0b110010) + chr(0b110000) + chr(0b10110 + 0o32), 0o10), nzTpIcepk0o8(chr(587 - 539) + chr(2359 - 2248) + chr(0b10011 + 0o40) + '\x36' + chr(0b11000 + 0o30), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000010 + 0o55) + chr(51) + chr(0b101010 + 0o13) + chr(0b10001 + 0o42), 31423 - 31415), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\065' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(371 - 260) + chr(0b101100 + 0o7) + chr(0b110001) + chr(0b100110 + 0o20), 0b1000), nzTpIcepk0o8(chr(538 - 490) + chr(0b10000 + 0o137) + chr(0b110011) + chr(0b110100) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + chr(0b100101 + 0o16) + chr(52) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(0b110011) + chr(0b110100) + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b11001 + 0o33) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1010000 + 0o37) + chr(0b110010) + chr(0b10101 + 0o34) + '\x34', 58255 - 58247), nzTpIcepk0o8(chr(1197 - 1149) + chr(0b1101111) + chr(0b101 + 0o56) + '\065' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1785 - 1737) + chr(111) + '\063' + chr(2086 - 2035) + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(1306 - 1195) + '\063' + chr(0b10111 + 0o36) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10110 + 0o35) + '\x35' + chr(476 - 428), 0o10), nzTpIcepk0o8('\060' + chr(3942 - 3831) + chr(0b10011 + 0o37) + '\x34' + '\062', 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1001101 + 0o42) + '\063' + '\065' + chr(50), 59705 - 59697), nzTpIcepk0o8('\060' + chr(2840 - 2729) + chr(53) + '\x35', 0b1000), nzTpIcepk0o8(chr(294 - 246) + chr(111) + chr(49) + chr(54) + '\060', 2135 - 2127), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b110000 + 0o7) + chr(290 - 237), 0o10), nzTpIcepk0o8(chr(536 - 488) + '\157' + chr(0b110001) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(120 - 69) + '\063' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(49) + chr(1897 - 1844), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(0b101010 + 0o12) + chr(55), 0o10), nzTpIcepk0o8(chr(1802 - 1754) + '\x6f' + chr(0b100110 + 0o15) + chr(1286 - 1236) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(828 - 780) + '\x6f' + chr(0b110101) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(0b110001) + chr(1185 - 1131) + '\x32', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + '\x30', 16780 - 16772)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\\'), chr(100) + '\x65' + '\143' + '\x6f' + '\144' + chr(0b1100101))(chr(0b1110010 + 0o3) + chr(0b1110011 + 0o1) + '\x66' + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GulFjhFAvLHT(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x13\x01\x8b\xa7\x88>\xad\n=DG\xbf'), chr(1206 - 1106) + '\x65' + '\x63' + chr(244 - 133) + '\x64' + chr(0b11001 + 0o114))(chr(117) + chr(0b1110100 + 0o0) + chr(102) + chr(0b101101) + '\070')) and (not roI3spqORKae(hXMPsSrOQzbh._client, roI3spqORKae(ES5oEprVxulp(b'\x1b@\x99\x92\x95h\xb3\t\x11'), chr(0b1011110 + 0o6) + chr(0b1100101) + '\x63' + '\x6f' + chr(3900 - 3800) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(1440 - 1338) + chr(45) + chr(0b111000)))): return roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\x01F\xa5\x92\x9cb\xa4'), '\144' + chr(0b1100011 + 0o2) + chr(0b1100011) + chr(0b1011001 + 0o26) + '\144' + chr(0b1100101))(chr(9629 - 9512) + chr(0b1110100) + chr(102) + chr(0b110 + 0o47) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x13\x01\x8b\xa7\x88>\xad\n=DG\xbf'), '\x64' + '\145' + '\x63' + chr(10950 - 10839) + chr(0b10000 + 0o124) + chr(101))(chr(117) + '\164' + '\x66' + '\055' + '\x38'))) else: return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x17w\xb5\x9f\xcfR\xad4&eF\xcb'), chr(0b1100100) + '\145' + chr(0b11001 + 0o112) + '\x6f' + '\x64' + chr(8315 - 8214))(chr(117) + chr(116) + '\x66' + '\055' + chr(56)))
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactoryV2.consume
def consume(self, callback, bindings, queues): """ Start a consumer that lasts across individual connections. Args: callback (callable): A callable object that accepts one positional argument, a :class:`Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queues to declare and consume from. Each key in this dictionary is a queue, and each value is its settings as a dictionary. These settings dictionaries should have the "durable", "auto_delete", "exclusive", and "arguments" keys. Refer to :ref:`conf-queues` for details on their meanings. Returns: defer.Deferred: A deferred that fires with the list of one or more :class:`fedora_messaging.twisted.consumer.Consumer` objects. These can be passed to the :meth:`FedoraMessagingFactoryV2.cancel` API to halt them. Each consumer object has a ``result`` instance variable that is a Deferred that fires or errors when the consumer halts. The Deferred may error back with a BadDeclaration if the user does not have permissions to consume from the queue. """ expanded_bindings = collections.defaultdict(list) for binding in bindings: for key in binding["routing_keys"]: b = binding.copy() del b["routing_keys"] b["routing_key"] = key expanded_bindings[b["queue"]].append(b) expanded_queues = [] for name, settings in queues.items(): q = {"queue": name} q.update(settings) expanded_queues.append(q) protocol = yield self.when_connected() consumers = [] for queue in expanded_queues: yield protocol.declare_queues([queue]) b = expanded_bindings.get(queue["queue"], []) yield protocol.bind_queues(b) consumer = yield protocol.consume(callback, queue["queue"]) self._consumers[queue["queue"]] = (consumer, queue, b) consumers.append(consumer) defer.returnValue(consumers)
python
def consume(self, callback, bindings, queues): """ Start a consumer that lasts across individual connections. Args: callback (callable): A callable object that accepts one positional argument, a :class:`Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queues to declare and consume from. Each key in this dictionary is a queue, and each value is its settings as a dictionary. These settings dictionaries should have the "durable", "auto_delete", "exclusive", and "arguments" keys. Refer to :ref:`conf-queues` for details on their meanings. Returns: defer.Deferred: A deferred that fires with the list of one or more :class:`fedora_messaging.twisted.consumer.Consumer` objects. These can be passed to the :meth:`FedoraMessagingFactoryV2.cancel` API to halt them. Each consumer object has a ``result`` instance variable that is a Deferred that fires or errors when the consumer halts. The Deferred may error back with a BadDeclaration if the user does not have permissions to consume from the queue. """ expanded_bindings = collections.defaultdict(list) for binding in bindings: for key in binding["routing_keys"]: b = binding.copy() del b["routing_keys"] b["routing_key"] = key expanded_bindings[b["queue"]].append(b) expanded_queues = [] for name, settings in queues.items(): q = {"queue": name} q.update(settings) expanded_queues.append(q) protocol = yield self.when_connected() consumers = [] for queue in expanded_queues: yield protocol.declare_queues([queue]) b = expanded_bindings.get(queue["queue"], []) yield protocol.bind_queues(b) consumer = yield protocol.consume(callback, queue["queue"]) self._consumers[queue["queue"]] = (consumer, queue, b) consumers.append(consumer) defer.returnValue(consumers)
[ "def", "consume", "(", "self", ",", "callback", ",", "bindings", ",", "queues", ")", ":", "expanded_bindings", "=", "collections", ".", "defaultdict", "(", "list", ")", "for", "binding", "in", "bindings", ":", "for", "key", "in", "binding", "[", "\"routing_keys\"", "]", ":", "b", "=", "binding", ".", "copy", "(", ")", "del", "b", "[", "\"routing_keys\"", "]", "b", "[", "\"routing_key\"", "]", "=", "key", "expanded_bindings", "[", "b", "[", "\"queue\"", "]", "]", ".", "append", "(", "b", ")", "expanded_queues", "=", "[", "]", "for", "name", ",", "settings", "in", "queues", ".", "items", "(", ")", ":", "q", "=", "{", "\"queue\"", ":", "name", "}", "q", ".", "update", "(", "settings", ")", "expanded_queues", ".", "append", "(", "q", ")", "protocol", "=", "yield", "self", ".", "when_connected", "(", ")", "consumers", "=", "[", "]", "for", "queue", "in", "expanded_queues", ":", "yield", "protocol", ".", "declare_queues", "(", "[", "queue", "]", ")", "b", "=", "expanded_bindings", ".", "get", "(", "queue", "[", "\"queue\"", "]", ",", "[", "]", ")", "yield", "protocol", ".", "bind_queues", "(", "b", ")", "consumer", "=", "yield", "protocol", ".", "consume", "(", "callback", ",", "queue", "[", "\"queue\"", "]", ")", "self", ".", "_consumers", "[", "queue", "[", "\"queue\"", "]", "]", "=", "(", "consumer", ",", "queue", ",", "b", ")", "consumers", ".", "append", "(", "consumer", ")", "defer", ".", "returnValue", "(", "consumers", ")" ]
Start a consumer that lasts across individual connections. Args: callback (callable): A callable object that accepts one positional argument, a :class:`Message` or a class object that implements the ``__call__`` method. The class will be instantiated before use. bindings (dict or list of dict): Bindings to declare before consuming. This should be the same format as the :ref:`conf-bindings` configuration. queues (dict): The queues to declare and consume from. Each key in this dictionary is a queue, and each value is its settings as a dictionary. These settings dictionaries should have the "durable", "auto_delete", "exclusive", and "arguments" keys. Refer to :ref:`conf-queues` for details on their meanings. Returns: defer.Deferred: A deferred that fires with the list of one or more :class:`fedora_messaging.twisted.consumer.Consumer` objects. These can be passed to the :meth:`FedoraMessagingFactoryV2.cancel` API to halt them. Each consumer object has a ``result`` instance variable that is a Deferred that fires or errors when the consumer halts. The Deferred may error back with a BadDeclaration if the user does not have permissions to consume from the queue.
[ "Start", "a", "consumer", "that", "lasts", "across", "individual", "connections", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2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L_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(786 - 736) + '\x30' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + '\065' + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(50) + '\x30', 62608 - 62600), nzTpIcepk0o8(chr(1969 - 1921) + chr(0b1101111) + chr(0b110001) + '\067' + chr(55), 33249 - 33241), nzTpIcepk0o8(chr(1193 - 1145) + chr(0b10010 + 0o135) + chr(52) + chr(0b110101), 51942 - 51934), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b10111 + 0o34) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(0b10110 + 0o33) + chr(2433 - 2379) + '\064', 2929 - 2921), nzTpIcepk0o8('\060' + chr(2749 - 2638) + chr(49) + chr(2493 - 2441) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(622 - 571) + chr(2202 - 2152) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b110000) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + '\x31' + '\067' + chr(1641 - 1590), 42390 - 42382), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(293 - 243) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(0b110011) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + chr(1072 - 961) + '\062' + chr(0b10 + 0o60) + '\060', 31379 - 31371), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b110001) + chr(54) + '\061', 0o10), nzTpIcepk0o8(chr(164 - 116) + chr(111) + chr(0b11000 + 0o33) + '\x32' + chr(0b1010 + 0o51), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(0b10 + 0o61) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2308 - 2259) + chr(0b110110) + '\x37', 25031 - 25023), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\061' + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\063' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(0b110011) + chr(0b110010) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100110 + 0o111) + '\063' + '\062', 0o10), nzTpIcepk0o8(chr(758 - 710) + chr(3918 - 3807) + '\x33' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\x32' + chr(2256 - 2204) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b101110 + 0o7) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(3946 - 3835) + '\061' + '\062' + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + chr(0b11 + 0o60) + chr(50) + chr(0b110110), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(643 - 590) + chr(50), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + '\062' + chr(2783 - 2729) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1110 + 0o141) + '\061' + chr(0b110110) + '\x37', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + '\062' + '\x30' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1791 - 1740) + chr(1867 - 1813) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b1000 + 0o53), 35282 - 35274), nzTpIcepk0o8('\x30' + chr(6017 - 5906) + '\062' + '\x35' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100001 + 0o16) + '\x31' + chr(0b110011) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(52) + chr(0b110110), 59834 - 59826), nzTpIcepk0o8(chr(0b110000) + chr(8639 - 8528) + chr(623 - 574) + chr(54) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\065' + chr(1740 - 1686), 7200 - 7192)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(389 - 341) + '\x6f' + chr(767 - 714) + chr(0b110000), 13677 - 13669)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xab'), chr(8052 - 7952) + chr(0b1111 + 0o126) + chr(0b1100011) + chr(0b111 + 0o150) + chr(100) + chr(0b1010101 + 0o20))(chr(0b1101100 + 0o11) + '\164' + chr(102) + chr(1943 - 1898) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def X3OqjwXXClZ4(hXMPsSrOQzbh, jG5KU4UUGnk5, Eov4xKwUG62w, NJajU877lUB0): BkfwbD15RXEO = VmGquQq8pzNa.defaultdict(H4NoA26ON7iG) for kUiv6IrAIyl1 in Eov4xKwUG62w: for QYodcsDtoGq7 in kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'\xf7F\xa5\x0bL\xf1\x13;\xbf\xa0\x02\xe4'), chr(0b1011100 + 0o10) + chr(823 - 722) + chr(0b1011010 + 0o11) + chr(3218 - 3107) + '\144' + '\x65')(chr(0b1000100 + 0o61) + chr(116) + chr(102) + chr(45) + '\070')]: xFDEVQn5qSdh = kUiv6IrAIyl1.copy() del xFDEVQn5qSdh[roI3spqORKae(ES5oEprVxulp(b'\xf7F\xa5\x0bL\xf1\x13;\xbf\xa0\x02\xe4'), chr(8811 - 8711) + chr(101) + chr(0b1100011) + chr(0b110101 + 0o72) + chr(100) + '\145')('\x75' + '\164' + '\146' + chr(0b11110 + 0o17) + '\070')] xFDEVQn5qSdh[roI3spqORKae(ES5oEprVxulp(b'\xf7F\xa5\x0bL\xf1\x13;\xbf\xa0\x02'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b101110 + 0o66) + chr(101))(chr(0b1011100 + 0o31) + '\x74' + '\x66' + chr(324 - 279) + chr(56))] = QYodcsDtoGq7 roI3spqORKae(BkfwbD15RXEO[xFDEVQn5qSdh[roI3spqORKae(ES5oEprVxulp(b'\xf4\\\xb5\n@'), chr(100) + chr(101) + chr(99) + chr(3478 - 3367) + '\144' + chr(0b1100101))('\165' + '\164' + '\x66' + chr(0b11101 + 0o20) + chr(644 - 588))]], roI3spqORKae(ES5oEprVxulp(b'\xcd}\x83K]\xf83\x0b\xbe\xaa.\xa2'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(100) + chr(0b1100101))('\165' + chr(0b1 + 0o163) + '\x66' + chr(900 - 855) + chr(56)))(xFDEVQn5qSdh) cpE7Hol73CY8 = [] for (SLVB2BPA_mIe, tlZFbd_9MN8s) in roI3spqORKae(NJajU877lUB0, roI3spqORKae(ES5oEprVxulp(b'\xdcv\xbe1`\xe5<P\xe7\xb3#\xfe'), chr(4782 - 4682) + chr(0b1100101) + chr(0b1000110 + 0o35) + chr(0b1010100 + 0o33) + chr(0b1 + 0o143) + chr(101))(chr(0b1110101) + chr(116) + chr(3541 - 3439) + chr(0b101101) + chr(2780 - 2724)))(): P1yWu4gF7vxH = {roI3spqORKae(ES5oEprVxulp(b'\xf4\\\xb5\n@'), chr(0b1010101 + 0o17) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b101101) + '\070'): SLVB2BPA_mIe} roI3spqORKae(P1yWu4gF7vxH, roI3spqORKae(ES5oEprVxulp(b'\xcfv\xbbMl\xc66U\xb7\xa0\n\xf9'), chr(100) + '\x65' + '\143' + chr(0b1101111) + chr(2971 - 2871) + chr(0b1100011 + 0o2))(chr(0b1110101) + chr(0b1110100) + chr(0b10100 + 0o122) + '\x2d' + chr(0b11000 + 0o40)))(tlZFbd_9MN8s) roI3spqORKae(cpE7Hol73CY8, roI3spqORKae(ES5oEprVxulp(b'\xcd}\x83K]\xf83\x0b\xbe\xaa.\xa2'), chr(0b1100001 + 0o3) + chr(6463 - 6362) + '\x63' + '\157' + '\x64' + '\x65')(chr(0b1 + 0o164) + '\x74' + chr(0b100001 + 0o105) + chr(0b101001 + 0o4) + chr(56)))(P1yWu4gF7vxH) Yk6NhCmIsc7f = (yield hXMPsSrOQzbh.when_connected()) yRp8ZLirPPOG = [] for iRcFmb17G7aY in cpE7Hol73CY8: yield roI3spqORKae(Yk6NhCmIsc7f, roI3spqORKae(ES5oEprVxulp(b'\xe1L\xb3\x13D\xed\x11;\xa5\xb0\x1e\xe2bv'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(0b1010110 + 0o16) + '\145')(chr(6609 - 6492) + chr(0b1110100) + chr(0b100110 + 0o100) + chr(0b101101) + chr(2168 - 2112)))([iRcFmb17G7aY]) xFDEVQn5qSdh = BkfwbD15RXEO.GUKetu4xaGsJ(iRcFmb17G7aY[roI3spqORKae(ES5oEprVxulp(b'\xf4\\\xb5\n@'), '\x64' + chr(9227 - 9126) + '\x63' + chr(5498 - 5387) + '\x64' + chr(0b11001 + 0o114))('\165' + chr(0b1000100 + 0o60) + chr(2211 - 2109) + chr(0b101101) + chr(0b110100 + 0o4))], []) yield roI3spqORKae(Yk6NhCmIsc7f, roI3spqORKae(ES5oEprVxulp(b'\xe7@\xbe\x1bz\xee\x01\x01\xa1\xa0\x08'), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b101000 + 0o75))(chr(4742 - 4625) + chr(0b1110100) + '\x66' + '\055' + '\070'))(xFDEVQn5qSdh) Fz9tLfvnh2vf = (yield Yk6NhCmIsc7f.consume(jG5KU4UUGnk5, iRcFmb17G7aY[roI3spqORKae(ES5oEprVxulp(b'\xf4\\\xb5\n@'), chr(2780 - 2680) + '\x65' + chr(0b1001011 + 0o30) + '\x6f' + chr(100) + chr(0b100111 + 0o76))(chr(7471 - 7354) + chr(116) + chr(102) + chr(45) + chr(56))])) hXMPsSrOQzbh.iv39oDB3x3mc[iRcFmb17G7aY[roI3spqORKae(ES5oEprVxulp(b'\xf4\\\xb5\n@'), chr(100) + '\x65' + '\x63' + '\x6f' + '\144' + chr(8318 - 8217))(chr(0b1001111 + 0o46) + chr(116) + '\146' + chr(45) + chr(0b101110 + 0o12))]] = (Fz9tLfvnh2vf, iRcFmb17G7aY, xFDEVQn5qSdh) roI3spqORKae(yRp8ZLirPPOG, roI3spqORKae(ES5oEprVxulp(b'\xcd}\x83K]\xf83\x0b\xbe\xaa.\xa2'), '\144' + chr(101) + '\143' + chr(111) + chr(6941 - 6841) + '\145')('\165' + chr(4117 - 4001) + chr(102) + '\055' + chr(56)))(Fz9tLfvnh2vf) roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'\xf7L\xa4\nW\xf1"\x05\xb8\xb0\x1e'), '\144' + '\145' + chr(99) + chr(6800 - 6689) + chr(100) + chr(0b100100 + 0o101))(chr(0b1110101) + chr(116) + '\x66' + '\055' + chr(1176 - 1120)))(yRp8ZLirPPOG)
fedora-infra/fedora-messaging
fedora_messaging/twisted/factory.py
FedoraMessagingFactoryV2.cancel
def cancel(self, consumers): """ Cancel a consumer that was previously started with consume. Args: consumer (list of fedora_messaging.api.Consumer): The consumers to cancel. """ for consumer in consumers: del self._consumers[consumer.queue] protocol = yield self.when_connected() yield protocol.cancel(consumer)
python
def cancel(self, consumers): """ Cancel a consumer that was previously started with consume. Args: consumer (list of fedora_messaging.api.Consumer): The consumers to cancel. """ for consumer in consumers: del self._consumers[consumer.queue] protocol = yield self.when_connected() yield protocol.cancel(consumer)
[ "def", "cancel", "(", "self", ",", "consumers", ")", ":", "for", "consumer", "in", "consumers", ":", "del", "self", ".", "_consumers", "[", "consumer", ".", "queue", "]", "protocol", "=", "yield", "self", ".", "when_connected", "(", ")", "yield", "protocol", ".", "cancel", "(", "consumer", ")" ]
Cancel a consumer that was previously started with consume. Args: consumer (list of fedora_messaging.api.Consumer): The consumers to cancel.
[ "Cancel", "a", "consumer", "that", "was", "previously", "started", "with", "consume", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/factory.py#L431-L441
train
Cancel a consumer that was previously started with consume.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aF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rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(49) + '\x32' + chr(0b100001 + 0o23), 0b1000), nzTpIcepk0o8(chr(1048 - 1000) + chr(111) + '\061' + '\x33' + chr(0b101 + 0o56), 4093 - 4085), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(49) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1383 - 1332) + '\x35' + chr(0b100000 + 0o21), 57865 - 57857), nzTpIcepk0o8(chr(1801 - 1753) + chr(111) + '\x32' + chr(48) + '\060', 36074 - 36066), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(49) + chr(0b110011) + chr(1232 - 1184), ord("\x08")), nzTpIcepk0o8(chr(1944 - 1896) + chr(6085 - 5974) + '\063' + '\062' + chr(0b110101), 1451 - 1443), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(10603 - 10492) + chr(0b110000 + 0o1) + chr(0b110010) + chr(2060 - 2010), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1111 + 0o42) + chr(0b110000) + chr(52), 9018 - 9010), nzTpIcepk0o8(chr(645 - 597) + '\x6f' + chr(0b101011 + 0o10) + chr(0b10 + 0o57), 0o10), nzTpIcepk0o8('\060' + chr(0b1010000 + 0o37) + chr(342 - 291) + '\064' + chr(2101 - 2048), 0o10), nzTpIcepk0o8(chr(48) + chr(5133 - 5022) + '\062' + chr(0b11011 + 0o25) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1011010 + 0o25) + '\x31' + chr(0b110001) + chr(766 - 711), 54671 - 54663), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b11010 + 0o125) + chr(0b110011) + '\x36' + chr(0b100 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4534 - 4423) + chr(49) + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8(chr(875 - 827) + '\x6f' + '\x33' + chr(0b11101 + 0o25) + chr(1565 - 1516), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\x30' + chr(0b10000 + 0o42), 0o10), nzTpIcepk0o8(chr(275 - 227) + chr(0b110101 + 0o72) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(1908 - 1857) + '\x36' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(2035 - 1987) + '\157' + chr(50) + chr(0b110101) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(529 - 478) + chr(0b110000), 8002 - 7994), nzTpIcepk0o8(chr(1939 - 1891) + chr(8267 - 8156) + chr(50) + chr(1311 - 1257) + '\062', 0o10), nzTpIcepk0o8(chr(1277 - 1229) + chr(0b1011 + 0o144) + '\x37' + '\x33', 0b1000), nzTpIcepk0o8(chr(82 - 34) + '\x6f' + chr(52), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b11010 + 0o31) + '\x33' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\064' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(55) + chr(356 - 302), 14566 - 14558), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\063' + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111 + 0o0) + chr(0b10 + 0o61) + chr(0b110010) + chr(0b10011 + 0o43), 22930 - 22922), nzTpIcepk0o8(chr(2261 - 2213) + '\157' + chr(0b110111) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10111 + 0o32) + chr(48) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + chr(356 - 306) + '\x30' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b101100 + 0o103) + '\063' + chr(0b110100) + chr(0b11011 + 0o27), 65358 - 65350), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\063', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b10001 + 0o43) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(12222 - 12111) + chr(0b10000 + 0o42) + chr(0b11 + 0o60) + chr(0b110000), 8), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + '\063', ord("\x08")), nzTpIcepk0o8(chr(619 - 571) + '\x6f' + chr(51) + chr(52), 62633 - 62625), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2418 - 2366) + chr(1589 - 1541), 22349 - 22341)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'+'), chr(0b1100100) + chr(0b111100 + 0o51) + chr(99) + chr(0b110111 + 0o70) + chr(0b1100100) + chr(435 - 334))('\x75' + chr(116) + chr(102) + chr(0b101101) + chr(0b10010 + 0o46)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XeoIuri11m65(hXMPsSrOQzbh, yRp8ZLirPPOG): for Fz9tLfvnh2vf in yRp8ZLirPPOG: del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'l"hw\x86\xc4\x1a\xe6*wt\x86'), chr(0b110101 + 0o57) + '\x65' + chr(2937 - 2838) + chr(0b1101011 + 0o4) + '\144' + chr(101))(chr(12645 - 12528) + '\164' + chr(7350 - 7248) + '\055' + chr(0b111000)))[roI3spqORKae(Fz9tLfvnh2vf, roI3spqORKae(ES5oEprVxulp(b'l\x068\x08\x84\xe2i\xe2\x15sx\xbc'), chr(0b101010 + 0o72) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(7154 - 7054) + chr(0b1100101))('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)))] Yk6NhCmIsc7f = (yield hXMPsSrOQzbh.when_connected()) yield roI3spqORKae(Yk6NhCmIsc7f, roI3spqORKae(ES5oEprVxulp(b'f55-\x8c\xec'), chr(5098 - 4998) + chr(0b1101 + 0o130) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1000010 + 0o43))(chr(117) + chr(0b10110 + 0o136) + chr(10180 - 10078) + chr(0b101101) + '\x38'))(Fz9tLfvnh2vf)
fedora-infra/fedora-messaging
fedora_messaging/twisted/consumer.py
Consumer.cancel
def cancel(self): """ Cancel the consumer and clean up resources associated with it. Consumers that are canceled are allowed to finish processing any messages before halting. Returns: defer.Deferred: A deferred that fires when the consumer has finished processing any message it was in the middle of and has been successfully canceled. """ # Remove it from protocol and factory so it doesn't restart later. try: del self._protocol._consumers[self.queue] except (KeyError, AttributeError): pass try: del self._protocol.factory._consumers[self.queue] except (KeyError, AttributeError): pass # Signal to the _read loop it's time to stop and wait for it to finish # with whatever message it might be working on, then wait for the deferred # to fire which indicates it is done. self._running = False yield self._read_loop try: yield self._channel.basic_cancel(consumer_tag=self._tag) except pika.exceptions.AMQPChannelError: # Consumers are tied to channels, so if this channel is dead the # consumer should already be canceled (and we can't get to it anyway) pass try: yield self._channel.close() except pika.exceptions.AMQPChannelError: pass if not self.result.called: self.result.callback(self)
python
def cancel(self): """ Cancel the consumer and clean up resources associated with it. Consumers that are canceled are allowed to finish processing any messages before halting. Returns: defer.Deferred: A deferred that fires when the consumer has finished processing any message it was in the middle of and has been successfully canceled. """ # Remove it from protocol and factory so it doesn't restart later. try: del self._protocol._consumers[self.queue] except (KeyError, AttributeError): pass try: del self._protocol.factory._consumers[self.queue] except (KeyError, AttributeError): pass # Signal to the _read loop it's time to stop and wait for it to finish # with whatever message it might be working on, then wait for the deferred # to fire which indicates it is done. self._running = False yield self._read_loop try: yield self._channel.basic_cancel(consumer_tag=self._tag) except pika.exceptions.AMQPChannelError: # Consumers are tied to channels, so if this channel is dead the # consumer should already be canceled (and we can't get to it anyway) pass try: yield self._channel.close() except pika.exceptions.AMQPChannelError: pass if not self.result.called: self.result.callback(self)
[ "def", "cancel", "(", "self", ")", ":", "# Remove it from protocol and factory so it doesn't restart later.", "try", ":", "del", "self", ".", "_protocol", ".", "_consumers", "[", "self", ".", "queue", "]", "except", "(", "KeyError", ",", "AttributeError", ")", ":", "pass", "try", ":", "del", "self", ".", "_protocol", ".", "factory", ".", "_consumers", "[", "self", ".", "queue", "]", "except", "(", "KeyError", ",", "AttributeError", ")", ":", "pass", "# Signal to the _read loop it's time to stop and wait for it to finish", "# with whatever message it might be working on, then wait for the deferred", "# to fire which indicates it is done.", "self", ".", "_running", "=", "False", "yield", "self", ".", "_read_loop", "try", ":", "yield", "self", ".", "_channel", ".", "basic_cancel", "(", "consumer_tag", "=", "self", ".", "_tag", ")", "except", "pika", ".", "exceptions", ".", "AMQPChannelError", ":", "# Consumers are tied to channels, so if this channel is dead the", "# consumer should already be canceled (and we can't get to it anyway)", "pass", "try", ":", "yield", "self", ".", "_channel", ".", "close", "(", ")", "except", "pika", ".", "exceptions", ".", "AMQPChannelError", ":", "pass", "if", "not", "self", ".", "result", ".", "called", ":", "self", ".", "result", ".", "callback", "(", "self", ")" ]
Cancel the consumer and clean up resources associated with it. Consumers that are canceled are allowed to finish processing any messages before halting. Returns: defer.Deferred: A deferred that fires when the consumer has finished processing any message it was in the middle of and has been successfully canceled.
[ "Cancel", "the", "consumer", "and", "clean", "up", "resources", "associated", "with", "it", ".", "Consumers", "that", "are", "canceled", "are", "allowed", "to", "finish", "processing", "any", "messages", "before", "halting", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/consumer.py#L70-L106
train
Cancel the consumer and clean up resources associated with it.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wX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vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + '\061' + '\x34' + chr(717 - 664), 0o10), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + '\061' + '\065' + chr(1855 - 1802), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1000 + 0o52) + chr(0b10 + 0o62) + chr(51), 26142 - 26134), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10111 + 0o32) + chr(0b110110) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(2895 - 2784) + '\x32' + chr(0b10 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + '\x31' + chr(0b100110 + 0o20) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101100 + 0o3) + '\061' + chr(49) + '\x34', 0b1000), nzTpIcepk0o8(chr(1812 - 1764) + '\157' + chr(369 - 320) + '\061' + chr(55), 56811 - 56803), nzTpIcepk0o8('\060' + chr(6748 - 6637) + chr(1721 - 1672) + chr(0b101001 + 0o7) + chr(0b1101 + 0o44), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110 + 0o57) + '\063', ord("\x08")), nzTpIcepk0o8(chr(2061 - 2013) + chr(0b1010010 + 0o35) + chr(272 - 218) + chr(0b110100), 10831 - 10823), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1599 - 1548) + chr(0b101000 + 0o17) + chr(0b101100 + 0o12), 0o10), nzTpIcepk0o8(chr(1530 - 1482) + '\x6f' + chr(2175 - 2125) + chr(0b101000 + 0o12) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + chr(0b110011) + chr(51) + chr(0b100100 + 0o21), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b110001) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000000 + 0o57) + chr(0b1100 + 0o46) + '\066' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(0b110000 + 0o2) + '\062' + chr(48), 10196 - 10188), nzTpIcepk0o8('\x30' + chr(8969 - 8858) + '\x31' + '\060' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(337 - 289) + '\157' + chr(1343 - 1292) + chr(54) + '\x33', 26529 - 26521), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110001) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(4316 - 4205) + chr(0b101 + 0o55) + '\x37' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(1030 - 979) + chr(0b100100 + 0o16) + chr(54), 30839 - 30831), nzTpIcepk0o8(chr(48) + chr(0b1001 + 0o146) + '\x33' + chr(48) + chr(2156 - 2102), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1011001 + 0o26) + chr(0b100000 + 0o22) + chr(0b110111) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1010 + 0o47) + chr(0b110101) + chr(1930 - 1881), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\065' + '\067', 31827 - 31819), nzTpIcepk0o8(chr(1910 - 1862) + chr(0b1000 + 0o147) + chr(0b110111) + chr(579 - 529), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(1864 - 1753) + '\x32' + chr(2324 - 2275) + '\062', 37213 - 37205), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\061' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b11101 + 0o122) + chr(0b101100 + 0o7) + '\x33' + chr(0b110111), 35582 - 35574), nzTpIcepk0o8('\x30' + chr(0b1000111 + 0o50) + '\063' + chr(830 - 778) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(0b110011) + '\x35' + chr(1398 - 1345), 58797 - 58789), nzTpIcepk0o8(chr(1532 - 1484) + chr(0b1101111) + chr(49) + chr(54) + chr(0b110100 + 0o0), 33146 - 33138), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + chr(534 - 484) + chr(964 - 910) + '\x31', 64006 - 63998), nzTpIcepk0o8(chr(0b110000) + chr(0b1001111 + 0o40) + chr(1414 - 1363) + chr(0b110110) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(7148 - 7037) + chr(1222 - 1173) + '\x32' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(458 - 408) + chr(49) + '\x34', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + '\x31' + chr(52) + '\x35', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + '\x35' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'K'), chr(100) + chr(0b1100101) + chr(1918 - 1819) + chr(0b100101 + 0o112) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b11101 + 0o111) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XeoIuri11m65(hXMPsSrOQzbh): try: del roI3spqORKae(hXMPsSrOQzbh._protocol, roI3spqORKae(ES5oEprVxulp(b'\x0c\x1b\x90N~6\x0e|9\xd8Y\x9d'), '\144' + chr(0b1001011 + 0o32) + chr(0b1100011) + chr(10205 - 10094) + chr(100) + chr(0b111010 + 0o53))(chr(2030 - 1913) + '\x74' + chr(0b11000 + 0o116) + chr(45) + '\070'))[roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0c?\xc01|\x10}x\x06\xdcU\xa7'), chr(100) + chr(101) + chr(99) + chr(7133 - 7022) + chr(100) + '\x65')('\x75' + chr(0b1001100 + 0o50) + '\x66' + '\x2d' + '\x38'))] except (knUxyjfq07F9, bIsJhlpYrrU2): pass try: del roI3spqORKae(hXMPsSrOQzbh._protocol.factory, roI3spqORKae(ES5oEprVxulp(b'\x0c\x1b\x90N~6\x0e|9\xd8Y\x9d'), '\x64' + chr(0b100001 + 0o104) + chr(0b1010101 + 0o16) + chr(0b1011010 + 0o25) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + '\055' + '\x38'))[roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0c?\xc01|\x10}x\x06\xdcU\xa7'), chr(100) + chr(0b1000001 + 0o44) + '\x63' + chr(0b1 + 0o156) + chr(2242 - 2142) + chr(2393 - 2292))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070'))] except (knUxyjfq07F9, bIsJhlpYrrU2): pass hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(48), 0b1000) yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1d\x1c\x9a<Z!=.\x0b\xd3Y\x8f'), '\144' + chr(0b1100101) + chr(99) + chr(0b1000001 + 0o56) + chr(100) + chr(101))(chr(0b1110101) + chr(9099 - 8983) + '\146' + chr(45) + chr(1747 - 1691))) try: yield roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'\x07\x0c\xd0\x1er-/./\x88Q\x92'), chr(6481 - 6381) + chr(0b1100101) + chr(0b1100011) + chr(0b101010 + 0o105) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + '\x66' + chr(1378 - 1333) + '\070'))(consumer_tag=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b':\x19\xc2\x10'), '\144' + chr(0b1100101) + '\x63' + chr(7691 - 7580) + chr(7207 - 7107) + chr(0b11100 + 0o111))(chr(0b1011010 + 0o33) + chr(116) + chr(0b1100110) + chr(328 - 283) + chr(0b111000)))) except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b"$ \xf2'R\x1a-!/\x8eX\xbb\xe0\xaf\xe1\xc4"), chr(0b1001101 + 0o27) + chr(0b1100101) + chr(0b1001011 + 0o30) + chr(0b110110 + 0o71) + '\144' + chr(2650 - 2549))('\165' + chr(0b1000011 + 0o61) + '\x66' + chr(0b101101) + chr(56))): pass try: yield roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'?\x08\xd2@R\x11*v\x14\x8f\x0c\x94'), '\x64' + chr(0b1100101) + '\143' + chr(0b1011111 + 0o20) + '\x64' + '\145')(chr(13211 - 13094) + '\x74' + '\146' + chr(591 - 546) + chr(0b111000)))() except roI3spqORKae(HRawGMbkRJHa.exceptions, roI3spqORKae(ES5oEprVxulp(b"$ \xf2'R\x1a-!/\x8eX\xbb\xe0\xaf\xe1\xc4"), chr(0b1100100) + '\145' + chr(5008 - 4909) + chr(10540 - 10429) + chr(4850 - 4750) + '\145')(chr(0b11 + 0o162) + chr(0b1110100) + chr(4163 - 4061) + '\x2d' + '\070')): pass if not roI3spqORKae(hXMPsSrOQzbh.result, roI3spqORKae(ES5oEprVxulp(b'\x02\x08\xd1F$&<\x18\x13\xbb]\xb3'), chr(0b1010110 + 0o16) + chr(0b111101 + 0o50) + chr(0b1100011) + chr(111) + chr(6004 - 5904) + chr(6687 - 6586))('\x75' + chr(11416 - 11300) + chr(0b1100110) + chr(45) + chr(0b101111 + 0o11))): roI3spqORKae(hXMPsSrOQzbh.result, roI3spqORKae(ES5oEprVxulp(b'\x0f*\x96<DF\x19\x1a\x06\x85_\xcb'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(0b1100100 + 0o2) + chr(1799 - 1754) + '\x38'))(hXMPsSrOQzbh)
fedora-infra/fedora-messaging
fedora_messaging/config.py
validate_bindings
def validate_bindings(bindings): """ Validate the bindings configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format. """ if not isinstance(bindings, (list, tuple)): raise exceptions.ConfigurationException( "bindings must be a list or tuple of dictionaries, but was a {}".format( type(bindings) ) ) for binding in bindings: missing_keys = [] for key in ("queue", "exchange", "routing_keys"): if key not in binding: missing_keys.append(key) if missing_keys: raise exceptions.ConfigurationException( "a binding is missing the following keys from its settings " "value: {}".format(missing_keys) ) if not isinstance(binding["routing_keys"], (list, tuple)): raise exceptions.ConfigurationException( "routing_keys must be a list or tuple, but was a {}".format( type(binding["routing_keys"]) ) )
python
def validate_bindings(bindings): """ Validate the bindings configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format. """ if not isinstance(bindings, (list, tuple)): raise exceptions.ConfigurationException( "bindings must be a list or tuple of dictionaries, but was a {}".format( type(bindings) ) ) for binding in bindings: missing_keys = [] for key in ("queue", "exchange", "routing_keys"): if key not in binding: missing_keys.append(key) if missing_keys: raise exceptions.ConfigurationException( "a binding is missing the following keys from its settings " "value: {}".format(missing_keys) ) if not isinstance(binding["routing_keys"], (list, tuple)): raise exceptions.ConfigurationException( "routing_keys must be a list or tuple, but was a {}".format( type(binding["routing_keys"]) ) )
[ "def", "validate_bindings", "(", "bindings", ")", ":", "if", "not", "isinstance", "(", "bindings", ",", "(", "list", ",", "tuple", ")", ")", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "\"bindings must be a list or tuple of dictionaries, but was a {}\"", ".", "format", "(", "type", "(", "bindings", ")", ")", ")", "for", "binding", "in", "bindings", ":", "missing_keys", "=", "[", "]", "for", "key", "in", "(", "\"queue\"", ",", "\"exchange\"", ",", "\"routing_keys\"", ")", ":", "if", "key", "not", "in", "binding", ":", "missing_keys", ".", "append", "(", "key", ")", "if", "missing_keys", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "\"a binding is missing the following keys from its settings \"", "\"value: {}\"", ".", "format", "(", "missing_keys", ")", ")", "if", "not", "isinstance", "(", "binding", "[", "\"routing_keys\"", "]", ",", "(", "list", ",", "tuple", ")", ")", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "\"routing_keys must be a list or tuple, but was a {}\"", ".", "format", "(", "type", "(", "binding", "[", "\"routing_keys\"", "]", ")", ")", ")" ]
Validate the bindings configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format.
[ "Validate", "the", "bindings", "configuration", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/config.py#L357-L388
train
Validate the bindings configuration.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reR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QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\063' + '\063' + chr(49), 44693 - 44685), nzTpIcepk0o8('\x30' + chr(5838 - 5727) + chr(50) + chr(0b101001 + 0o11) + chr(0b110100), 17613 - 17605), nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + '\x36' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1968 - 1920) + chr(917 - 868), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b100100 + 0o20), 60628 - 60620), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(11101 - 10990) + chr(0b110001) + '\061' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10 + 0o60) + '\066' + chr(0b100011 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(0b110100) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11100 + 0o25) + chr(0b110001 + 0o1), 44257 - 44249), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100011 + 0o23) + chr(0b110010), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(1833 - 1783) + chr(51) + chr(0b110000 + 0o2), 33975 - 33967), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\063' + chr(0b110011) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + chr(673 - 624) + '\066' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x34' + chr(0b10101 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9833 - 9722) + chr(0b110011) + chr(1394 - 1341) + chr(0b10001 + 0o42), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(399 - 350) + '\x33' + chr(50), 0b1000), nzTpIcepk0o8(chr(1618 - 1570) + chr(0b101100 + 0o103) + chr(1669 - 1619) + '\x30' + chr(54), 0o10), nzTpIcepk0o8('\060' + chr(10027 - 9916) + '\x31' + chr(0b110011), 25373 - 25365), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(1292 - 1237) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + '\x31' + chr(1575 - 1523) + chr(1731 - 1676), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(2244 - 2195) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(2740 - 2687) + chr(0b10100 + 0o40), 0o10), nzTpIcepk0o8(chr(1021 - 973) + '\x6f' + chr(0b100011 + 0o20) + chr(1033 - 979) + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1000 + 0o52) + '\061' + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x34' + '\x31', 8), nzTpIcepk0o8(chr(212 - 164) + chr(111) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\x33' + '\x31', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11010 + 0o31) + chr(52) + chr(49), 50307 - 50299), nzTpIcepk0o8(chr(0b110000) + chr(11937 - 11826) + chr(51) + chr(0b110111) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(2192 - 2081) + chr(0b10101 + 0o34) + '\x30' + chr(0b110 + 0o60), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + chr(0b110011) + chr(0b111 + 0o56) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1001110 + 0o41) + '\061' + chr(49) + chr(1867 - 1817), 0o10), nzTpIcepk0o8('\060' + chr(9856 - 9745) + chr(0b110010) + chr(94 - 39) + chr(1920 - 1869), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(49) + '\x32' + '\066', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b110101) + chr(0b100100 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(2803 - 2749), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5212 - 5101) + chr(0b1111 + 0o46), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(50) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(52) + '\062', 103 - 95), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + '\x33' + '\067' + '\x35', 43017 - 43009)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf7'), chr(100) + chr(1400 - 1299) + chr(0b1100000 + 0o3) + chr(111) + '\x64' + chr(0b1100101))('\165' + chr(4908 - 4792) + chr(0b1100110) + chr(1407 - 1362) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Zx3z2PmRKbZS(Eov4xKwUG62w): if not suIjIS24Zkqw(Eov4xKwUG62w, (H4NoA26ON7iG, nfNqtJL5aRaY)): raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\x9a\xfb\\\xe7u)\xc7SkF\xf3\xb0\x19\xa7\x939\xe3{\n\x0e\xe3\x82'), chr(0b11000 + 0o114) + chr(114 - 13) + '\143' + chr(111) + chr(0b1100100) + chr(0b1010011 + 0o22))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\x2d' + '\x38'))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b"\xbb\xfd\\\xe5u \xd5R*_\xef\xac\x03\xc2\x89?\xa6j^\x0b\xe5\x9f\x81\xa8Nw\xf9\x95\x8d6\x80/\x9b9\r.a9\xc1\x89\xb0\xfb\\\xe0n'\xd7R&\x12\xf8\xaa\x03\xc2\x9c;\xf5+\x1fG\xf7\x91"), chr(0b101101 + 0o67) + chr(2033 - 1932) + chr(0b101011 + 0o70) + chr(111) + '\x64' + chr(101))(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(2769 - 2713)), roI3spqORKae(ES5oEprVxulp(b'\xa8\xa7\x01\xca[}\xd4N[m\xd9\x95'), '\x64' + chr(0b101000 + 0o75) + '\143' + '\x6f' + chr(0b1100100) + chr(101))(chr(117) + chr(11728 - 11612) + chr(0b1100110) + chr(0b101101) + chr(284 - 228)))(MJ07XsN5uFgW(Eov4xKwUG62w))) for kUiv6IrAIyl1 in Eov4xKwUG62w: XvfzUKLndSiu = [] for QYodcsDtoGq7 in (roI3spqORKae(ES5oEprVxulp(b'\xa8\xe1W\xf4y'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(10982 - 10871) + '\144' + chr(8126 - 8025))('\165' + chr(13383 - 13267) + '\x66' + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xbc\xecQ\xe9} \xd5D'), chr(100) + '\145' + chr(99) + '\x6f' + chr(7565 - 7465) + '\x65')(chr(0b1011111 + 0o26) + chr(116) + chr(3301 - 3199) + '\055' + chr(0b100101 + 0o23)), roI3spqORKae(ES5oEprVxulp(b'\xab\xfbG\xf5u \xd5~aW\xe3\xac'), '\144' + chr(0b1011000 + 0o15) + '\x63' + '\x6f' + '\x64' + chr(4810 - 4709))(chr(117) + chr(116) + chr(7770 - 7668) + '\055' + '\070')): if QYodcsDtoGq7 not in kUiv6IrAIyl1: roI3spqORKae(XvfzUKLndSiu, roI3spqORKae(ES5oEprVxulp(b'\x91\xc0a\xb5d)\xf5N`]\xcf\xea'), '\144' + '\x65' + '\143' + '\x6f' + '\144' + chr(0b1100101))('\165' + chr(116) + '\146' + chr(0b101011 + 0o2) + '\x38'))(QYodcsDtoGq7) if XvfzUKLndSiu: raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\x9a\xfb\\\xe7u)\xc7SkF\xf3\xb0\x19\xa7\x939\xe3{\n\x0e\xe3\x82'), chr(2800 - 2700) + chr(0b11110 + 0o107) + chr(99) + '\157' + chr(9682 - 9582) + '\x65')(chr(1056 - 939) + chr(116) + '\x66' + '\055' + '\070'))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b"\xb8\xb4P\xe8r*\xdbOm\x12\xf3\xacW\x8f\x82)\xf5b\x10\x00\xac\x98\x9d\xed\x01c\xb6\x8d\x94)\x9b#\xd51Ke`)\xd1\xdd\xbf\xe6]\xec<'\xc6R*A\xff\xab\x03\x8b\x85=\xf5+\x08\x06\xe0\x99\x90\xb2\x01~\xa4"), '\144' + chr(0b11110 + 0o107) + chr(99) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + '\x74' + '\x66' + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xa8\xa7\x01\xca[}\xd4N[m\xd9\x95'), chr(0b100110 + 0o76) + chr(101) + '\x63' + '\157' + chr(5015 - 4915) + chr(0b100000 + 0o105))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000)))(XvfzUKLndSiu)) if not suIjIS24Zkqw(kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'\xab\xfbG\xf5u \xd5~aW\xe3\xac'), '\144' + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + '\145')(chr(10011 - 9894) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000))], (H4NoA26ON7iG, nfNqtJL5aRaY)): raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'\x9a\xfb\\\xe7u)\xc7SkF\xf3\xb0\x19\xa7\x939\xe3{\n\x0e\xe3\x82'), chr(5267 - 5167) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b100011 + 0o102))(chr(117) + '\x74' + '\146' + '\x2d' + chr(0b1000 + 0o60)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xab\xfbG\xf5u \xd5~aW\xe3\xacW\x8f\x9e)\xf2+\x1c\x02\xac\x8d\xd5\xe4Hv\xad\xc1\x974\xcc>\xce&\x07k)p\xc0\x88\xad\xb4E\xe0on\xd3\x01qO'), chr(0b1100100) + chr(0b111111 + 0o46) + chr(99) + '\x6f' + '\x64' + chr(101))('\165' + '\164' + chr(4812 - 4710) + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xa8\xa7\x01\xca[}\xd4N[m\xd9\x95'), chr(0b1001010 + 0o32) + chr(101) + chr(0b1100011) + '\x6f' + '\x64' + '\x65')(chr(0b1110101) + chr(0b1010101 + 0o37) + '\146' + chr(0b110 + 0o47) + chr(0b111000)))(MJ07XsN5uFgW(kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'\xab\xfbG\xf5u \xd5~aW\xe3\xac'), chr(100) + chr(101) + chr(8517 - 8418) + chr(0b1101111) + '\144' + chr(6053 - 5952))(chr(12511 - 12394) + chr(0b1110100) + '\x66' + '\055' + '\x38')])))
fedora-infra/fedora-messaging
fedora_messaging/config.py
validate_queues
def validate_queues(queues): """ Validate the queues configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format. """ if not isinstance(queues, dict): raise exceptions.ConfigurationException( "'queues' must be a dictionary mapping queue names to settings." ) for queue, settings in queues.items(): if not isinstance(settings, dict): raise exceptions.ConfigurationException( "the {} queue in the 'queues' setting has a value of type {}, but it " "should be a dictionary of settings.".format(queue, type(settings)) ) missing_keys = [] for key in ("durable", "auto_delete", "exclusive", "arguments"): if key not in settings: missing_keys.append(key) if missing_keys: raise exceptions.ConfigurationException( "the {} queue is missing the following keys from its settings " "value: {}".format(queue, missing_keys) )
python
def validate_queues(queues): """ Validate the queues configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format. """ if not isinstance(queues, dict): raise exceptions.ConfigurationException( "'queues' must be a dictionary mapping queue names to settings." ) for queue, settings in queues.items(): if not isinstance(settings, dict): raise exceptions.ConfigurationException( "the {} queue in the 'queues' setting has a value of type {}, but it " "should be a dictionary of settings.".format(queue, type(settings)) ) missing_keys = [] for key in ("durable", "auto_delete", "exclusive", "arguments"): if key not in settings: missing_keys.append(key) if missing_keys: raise exceptions.ConfigurationException( "the {} queue is missing the following keys from its settings " "value: {}".format(queue, missing_keys) )
[ "def", "validate_queues", "(", "queues", ")", ":", "if", "not", "isinstance", "(", "queues", ",", "dict", ")", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "\"'queues' must be a dictionary mapping queue names to settings.\"", ")", "for", "queue", ",", "settings", "in", "queues", ".", "items", "(", ")", ":", "if", "not", "isinstance", "(", "settings", ",", "dict", ")", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "\"the {} queue in the 'queues' setting has a value of type {}, but it \"", "\"should be a dictionary of settings.\"", ".", "format", "(", "queue", ",", "type", "(", "settings", ")", ")", ")", "missing_keys", "=", "[", "]", "for", "key", "in", "(", "\"durable\"", ",", "\"auto_delete\"", ",", "\"exclusive\"", ",", "\"arguments\"", ")", ":", "if", "key", "not", "in", "settings", ":", "missing_keys", ".", "append", "(", "key", ")", "if", "missing_keys", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "\"the {} queue is missing the following keys from its settings \"", "\"value: {}\"", ".", "format", "(", "queue", ",", "missing_keys", ")", ")" ]
Validate the queues configuration. Raises: exceptions.ConfigurationException: If the configuration provided is of an invalid format.
[ "Validate", "the", "queues", "configuration", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/config.py#L391-L418
train
Validates the queues configuration.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOd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RcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b10000 + 0o46) + chr(48), 28590 - 28582), nzTpIcepk0o8('\x30' + chr(9699 - 9588) + chr(0b110001) + '\x30' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(126 - 76) + '\x37', 0b1000), nzTpIcepk0o8(chr(470 - 422) + '\x6f' + '\x35' + '\067', 0o10), nzTpIcepk0o8(chr(799 - 751) + '\x6f' + chr(56 - 5) + '\x37', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(1787 - 1738) + chr(0b100000 + 0o21), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1218 - 1168) + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(6277 - 6166) + chr(0b101001 + 0o12) + chr(0b110101) + '\x31', 0b1000), nzTpIcepk0o8(chr(2294 - 2246) + chr(111) + chr(1467 - 1418) + chr(0b110010) + '\060', 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(6662 - 6551) + '\064' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b101010 + 0o15) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100101 + 0o17) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\x35' + chr(49), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101) + '\060', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101 + 0o142) + chr(1035 - 984) + chr(0b110111) + chr(0b10001 + 0o40), 36943 - 36935), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x37' + chr(48), 10860 - 10852), nzTpIcepk0o8('\x30' + chr(2723 - 2612) + '\063' + '\062' + '\065', 36268 - 36260), nzTpIcepk0o8('\060' + '\157' + chr(458 - 408) + '\x36' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(1734 - 1685) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(7423 - 7312) + '\063' + '\x32' + chr(423 - 373), ord("\x08")), nzTpIcepk0o8(chr(1344 - 1296) + chr(111) + chr(1786 - 1737) + '\x31' + chr(326 - 271), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + '\063' + '\x30' + chr(52), 0b1000), nzTpIcepk0o8(chr(491 - 443) + chr(111) + chr(0b110011) + chr(49) + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(1431 - 1376) + chr(1447 - 1395), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\x34' + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + '\060' + chr(1496 - 1446), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2223 - 2172) + chr(1897 - 1846) + chr(0b101000 + 0o11), 49413 - 49405), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110110) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(461 - 413) + '\x6f' + chr(1750 - 1701) + '\065' + chr(0b100 + 0o54), 28882 - 28874), nzTpIcepk0o8(chr(2049 - 2001) + chr(0b1101111) + chr(0b110010) + '\063' + '\061', 41730 - 41722), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + chr(0b100111 + 0o12) + '\x32' + chr(0b110101), 17373 - 17365), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b110110) + '\062', 0o10), nzTpIcepk0o8(chr(1143 - 1095) + chr(0b111100 + 0o63) + chr(50) + '\065' + chr(2164 - 2112), 52431 - 52423), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2083 - 2033) + '\062' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(7690 - 7579) + '\061' + chr(912 - 859) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + chr(51) + chr(48) + chr(0b1010 + 0o54), 0o10), nzTpIcepk0o8('\060' + chr(0b1011 + 0o144) + chr(0b111 + 0o54) + chr(0b110101) + '\067', 22526 - 22518)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(53) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'^'), '\144' + '\x65' + '\143' + chr(1782 - 1671) + '\x64' + chr(0b1011101 + 0o10))('\165' + chr(116) + '\x66' + '\055' + chr(0b11011 + 0o35)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GFBiL1Rv3t2s(NJajU877lUB0): if not suIjIS24Zkqw(NJajU877lUB0, znjnJWK64FDT): raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'3/jqFx\xbc\xe3\x88$I\x16O\xacP\x9aaH\xa1\xdd\xa7\xbc'), chr(100) + chr(101) + '\x63' + chr(111) + '\x64' + chr(0b110100 + 0o61))('\165' + '\164' + chr(0b1100110) + chr(0b100010 + 0o13) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'W1qrZz\xba\xb6\xc9=U\nU\xc9J\x9c$Y\xf5\xd0\xa1\xb1;\xad\xa6\xd2\x00\xf0\xa0\xd5\x05\xf8%\x02\xc5\xfanI\xb7\x9a\x155a7A~\xa4\xf4\x9apT\x16\x01\x9aM\x8dpQ\xbb\xd3\xbb\xfc'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(0b1001000 + 0o55) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111 + 0o61))) for (iRcFmb17G7aY, tlZFbd_9MN8s) in roI3spqORKae(NJajU877lUB0, roI3spqORKae(ES5oEprVxulp(b')\x1fjYje\x81\xa5\xda&x\x10'), chr(3652 - 3552) + chr(101) + '\x63' + chr(6203 - 6092) + chr(0b100000 + 0o104) + '\x65')(chr(0b1110101) + '\x74' + chr(1141 - 1039) + chr(721 - 676) + chr(0b101010 + 0o16)))(): if not suIjIS24Zkqw(tlZFbd_9MN8s, znjnJWK64FDT): raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'3/jqFx\xbc\xe3\x88$I\x16O\xacP\x9aaH\xa1\xdd\xa7\xbc'), '\144' + chr(4824 - 4723) + chr(0b110000 + 0o63) + chr(0b1101111) + chr(3717 - 3617) + chr(5567 - 5466))(chr(117) + chr(116) + chr(102) + chr(45) + chr(0b111000)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x04(a7Tb\xe9\xe0\x9c5U\x1c\x01\x80F\xd9pP\xb0\x94\xef\xa3:\xa1\xbc\xd9\x12\xa5\xf9\x86\r\xed!\x1b\xc2\xf3)\x01\xa7\x9cP!$aNs\xbc\xf4\xc9?FYU\x90X\x9c$C\xa8\x98\xe8\xb0:\xb0\xe9\xd5\x15\xa2\xaa\x9d\x07\xec9\x16\x8c\xf6lI\xa7\xcf\x14)gcFp\xa7\xf0\x9b)\x00\x16G\xc9[\x9cpL\xbc\xda\xaf\xa1a'), '\144' + '\145' + chr(99) + chr(111) + '\x64' + chr(9547 - 9446))('\165' + '\x74' + chr(0b1100110) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x01s7\\h,\xaf\xfe\xb8\x0fc3'), chr(100) + '\x65' + chr(0b10000 + 0o123) + chr(111) + chr(100) + '\145')('\165' + '\164' + chr(0b11101 + 0o111) + chr(267 - 222) + chr(0b111000)))(iRcFmb17G7aY, MJ07XsN5uFgW(tlZFbd_9MN8s))) XvfzUKLndSiu = [] for QYodcsDtoGq7 in (roI3spqORKae(ES5oEprVxulp(b'\x145vvMs\xac'), chr(0b1100100) + chr(0b1000101 + 0o40) + chr(907 - 808) + '\157' + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + '\146' + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x115pxp{\xac\xfd\x8c$E'), '\144' + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1100001 + 0o24) + chr(116) + chr(0b11000 + 0o116) + chr(0b101101) + chr(73 - 17)), roI3spqORKae(ES5oEprVxulp(b'\x158g{Zl\xa0\xe7\x8c'), chr(100) + '\145' + chr(0b10110 + 0o115) + '\157' + chr(100) + '\145')(chr(0b1110010 + 0o3) + chr(116) + chr(0b1100110) + chr(196 - 151) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x112cbBz\xa7\xe5\x9a'), '\144' + '\145' + chr(0b1100011) + chr(0b111110 + 0o61) + '\144' + chr(8564 - 8463))('\165' + chr(0b1110100) + '\146' + '\x2d' + chr(0b101100 + 0o14))): if QYodcsDtoGq7 not in tlZFbd_9MN8s: roI3spqORKae(XvfzUKLndSiu, roI3spqORKae(ES5oEprVxulp(b'8\x14W#Wx\x8e\xfe\x83?uL'), chr(1668 - 1568) + chr(222 - 121) + '\x63' + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b1111 + 0o36) + chr(56)))(QYodcsDtoGq7) if XvfzUKLndSiu: raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'3/jqFx\xbc\xe3\x88$I\x16O\xacP\x9aaH\xa1\xdd\xa7\xbc'), chr(0b1100100) + chr(101) + chr(6839 - 6740) + chr(0b1101111) + chr(0b1001101 + 0o27) + chr(0b1100101))(chr(0b10001 + 0o144) + '\164' + chr(4909 - 4807) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x04(a7Tb\xe9\xe0\x9c5U\x1c\x01\x80[\xd9iQ\xa6\xc7\xa1\xbc(\xe4\xbd\xd4\x04\xa2\xbf\x9a\x04\xf5:\x05\xc5\xfanI\xad\x8a\t3$q]p\xa4\xb1\x80$SYR\x8c\\\x8dmV\xb2\xc7\xe8\xa4.\xa8\xbc\xd9[\xa2\xa2\x88'), chr(0b1100100) + chr(101) + chr(0b1011100 + 0o7) + '\157' + chr(136 - 36) + chr(101))('\x75' + chr(0b111111 + 0o65) + chr(0b111111 + 0o47) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x01s7\\h,\xaf\xfe\xb8\x0fc3'), chr(0b1000000 + 0o44) + '\145' + '\x63' + '\x6f' + '\144' + chr(664 - 563))('\165' + chr(0b110 + 0o156) + chr(0b1011001 + 0o15) + chr(1021 - 976) + '\x38'))(iRcFmb17G7aY, XvfzUKLndSiu))
fedora-infra/fedora-messaging
fedora_messaging/config.py
validate_client_properties
def validate_client_properties(props): """ Validate the client properties setting. This will add the "version", "information", and "product" keys if they are missing. All other keys are application-specific. Raises: exceptions.ConfigurationException: If any of the basic keys are overridden. """ for key in ("version", "information", "product"): # Nested dictionaries are not merged so key can be missing if key not in props: props[key] = DEFAULTS["client_properties"][key] # Don't let users override these as they identify this library in AMQP if props[key] != DEFAULTS["client_properties"][key]: raise exceptions.ConfigurationException( '"{}" is a reserved keyword in client_properties'.format(key) )
python
def validate_client_properties(props): """ Validate the client properties setting. This will add the "version", "information", and "product" keys if they are missing. All other keys are application-specific. Raises: exceptions.ConfigurationException: If any of the basic keys are overridden. """ for key in ("version", "information", "product"): # Nested dictionaries are not merged so key can be missing if key not in props: props[key] = DEFAULTS["client_properties"][key] # Don't let users override these as they identify this library in AMQP if props[key] != DEFAULTS["client_properties"][key]: raise exceptions.ConfigurationException( '"{}" is a reserved keyword in client_properties'.format(key) )
[ "def", "validate_client_properties", "(", "props", ")", ":", "for", "key", "in", "(", "\"version\"", ",", "\"information\"", ",", "\"product\"", ")", ":", "# Nested dictionaries are not merged so key can be missing", "if", "key", "not", "in", "props", ":", "props", "[", "key", "]", "=", "DEFAULTS", "[", "\"client_properties\"", "]", "[", "key", "]", "# Don't let users override these as they identify this library in AMQP", "if", "props", "[", "key", "]", "!=", "DEFAULTS", "[", "\"client_properties\"", "]", "[", "key", "]", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "'\"{}\" is a reserved keyword in client_properties'", ".", "format", "(", "key", ")", ")" ]
Validate the client properties setting. This will add the "version", "information", and "product" keys if they are missing. All other keys are application-specific. Raises: exceptions.ConfigurationException: If any of the basic keys are overridden.
[ "Validate", "the", "client", "properties", "setting", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/config.py#L421-L439
train
Validate the client properties setting.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUS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urjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + chr(1819 - 1766) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1110 + 0o141) + '\x32' + chr(0b110101) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(293 - 243) + '\060' + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(1966 - 1916) + chr(0b101101 + 0o7), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(1849 - 1801) + chr(0b100000 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000 + 0o147) + chr(49) + chr(55) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b110001) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(2125 - 2077) + chr(111) + '\x32' + chr(53) + chr(0b11100 + 0o32), 0o10), nzTpIcepk0o8('\060' + chr(10587 - 10476) + chr(2304 - 2255) + chr(0b110010) + chr(1108 - 1057), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(1492 - 1437) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + '\x37' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(0b110011 + 0o0) + chr(0b100101 + 0o15), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b10110 + 0o131) + chr(0b110001) + '\x36' + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + chr(2590 - 2479) + '\x31' + chr(51) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(395 - 345) + chr(0b100011 + 0o20) + chr(0b1001 + 0o52), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100101 + 0o21) + '\064', 61486 - 61478), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1011 + 0o144) + '\x36' + chr(52), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b101111 + 0o4) + chr(0b101111 + 0o1) + chr(2293 - 2242), 61360 - 61352), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(49) + chr(0b10000 + 0o42) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\x37' + chr(53), 0b1000), nzTpIcepk0o8(chr(640 - 592) + chr(0b10100 + 0o133) + chr(2096 - 2047) + '\064' + chr(2115 - 2063), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(50) + chr(49), 19329 - 19321), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + chr(235 - 186) + '\x36' + chr(48), 8), nzTpIcepk0o8(chr(428 - 380) + chr(111) + chr(50) + '\x33' + chr(51), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2344 - 2294) + '\x35' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2288 - 2238) + chr(48) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1432 - 1383) + chr(833 - 780) + chr(1644 - 1594), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(0b110010) + '\x34', 63087 - 63079), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + '\x33' + chr(2647 - 2593) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110001) + chr(0b11110 + 0o31), 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b111110 + 0o61) + chr(0b1011 + 0o47) + '\064' + '\061', 0o10), nzTpIcepk0o8(chr(1496 - 1448) + chr(10376 - 10265) + chr(49) + chr(53) + '\x32', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b111 + 0o53) + chr(0b110000 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(114 - 65) + chr(0b110111) + chr(52), 0o10), nzTpIcepk0o8(chr(2189 - 2141) + chr(2104 - 1993) + chr(277 - 228) + chr(53) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(6470 - 6359) + '\x31' + chr(1286 - 1238) + chr(51), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2286 - 2235) + chr(1260 - 1208), 0o10), nzTpIcepk0o8('\x30' + chr(5463 - 5352) + chr(50) + chr(0b10001 + 0o42) + chr(154 - 99), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110011) + chr(0b11100 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001001 + 0o46) + '\x37' + chr(0b10110 + 0o40), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + chr(1133 - 1085), 48710 - 48702)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x02'), '\x64' + chr(101) + '\143' + chr(111) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(4079 - 3977) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XuQAlsX6f7Q9(QZqj8fCwMAhT): for QYodcsDtoGq7 in (roI3spqORKae(ES5oEprVxulp(b"Z\xcc\xf2'\xea\x14\xe5"), chr(0b1100100) + chr(101) + chr(2901 - 2802) + chr(10215 - 10104) + chr(0b1000100 + 0o40) + chr(8384 - 8283))('\165' + '\164' + chr(102) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'E\xc7\xe6;\xf1\x16\xea\xda:\x97W'), '\x64' + chr(0b1010110 + 0o17) + '\x63' + '\157' + chr(100) + '\145')('\x75' + chr(12208 - 12092) + chr(0b1100110) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\\\xdb\xef0\xf6\x18\xff'), chr(0b1 + 0o143) + chr(101) + chr(99) + chr(0b100001 + 0o116) + '\x64' + '\x65')(chr(117) + chr(116) + chr(2940 - 2838) + chr(0b101101) + chr(0b111000))): if QYodcsDtoGq7 not in QZqj8fCwMAhT: QZqj8fCwMAhT[QYodcsDtoGq7] = mYDtAE9iRJ5f[roI3spqORKae(ES5oEprVxulp(b'O\xc5\xe91\xed\x0f\xd4\xde!\x97I\xbf\x02.\xf2QG'), '\x64' + chr(0b1100101) + '\143' + chr(0b1011100 + 0o23) + '\x64' + chr(0b1100101))('\165' + '\x74' + chr(102) + '\x2d' + '\x38')][QYodcsDtoGq7] if QZqj8fCwMAhT[QYodcsDtoGq7] != mYDtAE9iRJ5f[roI3spqORKae(ES5oEprVxulp(b'O\xc5\xe91\xed\x0f\xd4\xde!\x97I\xbf\x02.\xf2QG'), chr(0b10111 + 0o115) + chr(0b1100101) + '\143' + chr(12129 - 12018) + '\x64' + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\x38')][QYodcsDtoGq7]: raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'o\xc6\xee2\xea\x1c\xfe\xdc2\x8cP\xb5\x1e\x1f\xe3WQ\xb3$\xd4\x0b?'), chr(0b1100100) + chr(101) + chr(0b100101 + 0o76) + chr(111) + chr(100) + chr(0b1100101))('\x75' + '\x74' + chr(651 - 549) + '\055' + chr(0b10011 + 0o45)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x0e\xd2\xfdv\xa3\x12\xf8\x8e2\xd8K\xbf\x03?\xe9BQ\xa7p\xd6\x01(\x07\xf4\xdf\xe1J}\x9e\xef\xc2\x06z\x19\x047C\xef-Q\\\xcc\xf2 \xea\x1e\xf8'), chr(2049 - 1949) + chr(5506 - 5405) + chr(99) + chr(111) + chr(100) + '\145')('\165' + chr(116) + '\146' + chr(0b10011 + 0o32) + chr(3113 - 3057)), roI3spqORKae(ES5oEprVxulp(b']\x9a\xb3\x1f\xc4H\xed\xc1\x02\xa7z\x90'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b1000000 + 0o46) + chr(0b101010 + 0o3) + chr(56)))(QYodcsDtoGq7))
fedora-infra/fedora-messaging
fedora_messaging/config.py
LazyConfig._validate
def _validate(self): """ Perform checks on the configuration to assert its validity Raises: ConfigurationException: If the configuration is invalid. """ for key in self: if key not in DEFAULTS: raise exceptions.ConfigurationException( 'Unknown configuration key "{}"! Valid configuration keys are' " {}".format(key, list(DEFAULTS.keys())) ) validate_queues(self["queues"]) validate_bindings(self["bindings"]) validate_client_properties(self["client_properties"])
python
def _validate(self): """ Perform checks on the configuration to assert its validity Raises: ConfigurationException: If the configuration is invalid. """ for key in self: if key not in DEFAULTS: raise exceptions.ConfigurationException( 'Unknown configuration key "{}"! Valid configuration keys are' " {}".format(key, list(DEFAULTS.keys())) ) validate_queues(self["queues"]) validate_bindings(self["bindings"]) validate_client_properties(self["client_properties"])
[ "def", "_validate", "(", "self", ")", ":", "for", "key", "in", "self", ":", "if", "key", "not", "in", "DEFAULTS", ":", "raise", "exceptions", ".", "ConfigurationException", "(", "'Unknown configuration key \"{}\"! Valid configuration keys are'", "\" {}\"", ".", "format", "(", "key", ",", "list", "(", "DEFAULTS", ".", "keys", "(", ")", ")", ")", ")", "validate_queues", "(", "self", "[", "\"queues\"", "]", ")", "validate_bindings", "(", "self", "[", "\"bindings\"", "]", ")", "validate_client_properties", "(", "self", "[", "\"client_properties\"", "]", ")" ]
Perform checks on the configuration to assert its validity Raises: ConfigurationException: If the configuration is invalid.
[ "Perform", "checks", "on", "the", "configuration", "to", "assert", "its", "validity" ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/config.py#L475-L491
train
Perform checks on the configuration to assert its validity.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUx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C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1311 - 1263) + '\x6f' + chr(0b100101 + 0o20) + chr(0b1101 + 0o51), 0b1000), nzTpIcepk0o8('\060' + chr(715 - 604) + chr(50) + chr(51) + chr(640 - 588), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010000 + 0o37) + chr(0b110010) + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(2913 - 2858) + chr(1525 - 1473), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + '\061' + chr(0b11000 + 0o32) + chr(555 - 503), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110111) + chr(0b101111 + 0o4), 43917 - 43909), nzTpIcepk0o8(chr(1277 - 1229) + '\x6f' + '\062' + '\064' + chr(0b110101), 6771 - 6763), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(49) + chr(0b100101 + 0o16) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(52) + chr(0b101000 + 0o13), 29319 - 29311), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b101010 + 0o10) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011100 + 0o23) + chr(0b101000 + 0o13) + chr(0b110100) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(0b1110 + 0o43) + chr(0b0 + 0o67) + '\x34', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\064' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2080 - 2031) + chr(1509 - 1459) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1956 - 1906) + '\063' + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b100011 + 0o17) + chr(0b10111 + 0o36), 30915 - 30907), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(1271 - 1220) + chr(52), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\x33' + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(5423 - 5312) + '\x31' + chr(0b110000) + chr(1816 - 1766), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4141 - 4030) + chr(1735 - 1685) + chr(48) + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(0b110011) + chr(0b110111) + '\x32', 0b1000), nzTpIcepk0o8(chr(594 - 546) + chr(111) + '\x31' + chr(50) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(54) + chr(1163 - 1113), 0b1000), nzTpIcepk0o8('\060' + chr(0b11010 + 0o125) + '\x31' + chr(52) + chr(0b10001 + 0o43), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(761 - 710) + '\067' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(2654 - 2543) + chr(53) + chr(663 - 611), 27308 - 27300), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b11000 + 0o36) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + chr(0b100001 + 0o22) + '\x30' + chr(54), 0b1000), nzTpIcepk0o8(chr(1175 - 1127) + chr(111) + chr(525 - 473) + chr(0b10101 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010 + 0o145) + '\x33' + chr(0b110100) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(0b1100001 + 0o16) + chr(0b110000 + 0o2) + chr(0b110000) + chr(1024 - 974), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b110001) + '\x34' + '\x32', 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + '\x32' + chr(0b110010) + chr(594 - 542), 33746 - 33738), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(0b110011) + '\x30' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1011001 + 0o26) + '\063' + '\x32' + chr(0b101001 + 0o13), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(53) + '\063', 35877 - 35869), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b11011 + 0o124) + '\x32' + chr(0b1001 + 0o56) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11082 - 10971) + chr(0b110001 + 0o2) + chr(1712 - 1660) + chr(118 - 63), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x30', 0b1000), nzTpIcepk0o8(chr(1261 - 1213) + chr(111) + '\063' + chr(55) + chr(53), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1858 - 1810) + '\x6f' + chr(53) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x00'), '\x64' + chr(3528 - 3427) + chr(0b101010 + 0o71) + '\x6f' + '\144' + '\145')(chr(0b1110101) + chr(0b11100 + 0o130) + '\x66' + chr(0b1100 + 0o41) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def AqLYhlxAXaWA(hXMPsSrOQzbh): for QYodcsDtoGq7 in hXMPsSrOQzbh: if QYodcsDtoGq7 not in mYDtAE9iRJ5f: raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'm\xf3\x7f\x1a=\\\xd0)\x02%\x8c\x13\xcd\x16\xe5v\xf9\xa96\xef\x95;'), '\144' + chr(0b1100101) + chr(6871 - 6772) + chr(0b110101 + 0o72) + chr(0b1100100) + chr(0b1000 + 0o135))(chr(117) + '\164' + '\146' + chr(0b101101) + chr(0b111000 + 0o0)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'{\xf2z\x12;L\xcb{\x00>\x8b\x1a\xca4\xe8g\xfd\xad+\xe9\x94u\x19\x01\x81\x0c\x94\xbd_\xc1\xa3B\xc2\xa4\xb8B\xda\xc7c\x92@\xfax\x1b!I\xc4/\n>\x8b\\\xc86\xe4f\xbc\xb80\xe3\xda.\x0f'), '\144' + chr(101) + chr(99) + '\157' + chr(100) + chr(0b100 + 0o141))('\165' + '\x74' + chr(0b1011101 + 0o11) + chr(1766 - 1721) + '\070'), roI3spqORKae(ES5oEprVxulp(b'_\xaf"7\x13\x08\xc342\x0e\xa66'), chr(100) + chr(0b100010 + 0o103) + '\143' + chr(111) + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(0b11100 + 0o21) + chr(56)))(QYodcsDtoGq7, H4NoA26ON7iG(roI3spqORKae(mYDtAE9iRJ5f, roI3spqORKae(ES5oEprVxulp(b'E\xf9h\x0f'), chr(9796 - 9696) + chr(5491 - 5390) + '\143' + chr(0b1111 + 0o140) + chr(4929 - 4829) + chr(101))(chr(4836 - 4719) + chr(815 - 699) + chr(0b1100110) + chr(0b0 + 0o55) + chr(171 - 115)))()))) GFBiL1Rv3t2s(hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'_\xe9t\t1H'), '\x64' + chr(101) + chr(0b1 + 0o142) + chr(0b10100 + 0o133) + chr(100) + '\x65')('\x75' + chr(0b1110100) + '\x66' + chr(0b10000 + 0o35) + chr(56))]) Zx3z2PmRKbZS(hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'L\xf5\x7f\x18=U\xc2('), chr(100) + chr(9404 - 9303) + chr(3977 - 3878) + chr(0b1101111) + chr(0b1011111 + 0o5) + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(1222 - 1177) + '\x38')]) XuQAlsX6f7Q9(hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b"M\xf0x\x19:O\xfa+\x11>\x95\x19\xd1'\xf4p\xef"), '\144' + chr(101) + '\143' + chr(111) + chr(100) + '\x65')('\165' + chr(116) + chr(102) + chr(1448 - 1403) + '\070')])
fedora-infra/fedora-messaging
fedora_messaging/config.py
LazyConfig.load_config
def load_config(self, config_path=None): """ Load application configuration from a file and merge it with the default configuration. If the ``FEDORA_MESSAGING_CONF`` environment variable is set to a filesystem path, the configuration will be loaded from that location. Otherwise, the path defaults to ``/etc/fedora-messaging/config.toml``. """ self.loaded = True config = copy.deepcopy(DEFAULTS) if config_path is None: if "FEDORA_MESSAGING_CONF" in os.environ: config_path = os.environ["FEDORA_MESSAGING_CONF"] else: config_path = "/etc/fedora-messaging/config.toml" if os.path.exists(config_path): _log.info("Loading configuration from {}".format(config_path)) with open(config_path) as fd: try: file_config = toml.load(fd) for key in file_config: config[key.lower()] = file_config[key] except toml.TomlDecodeError as e: msg = "Failed to parse {}: error at line {}, column {}: {}".format( config_path, e.lineno, e.colno, e.msg ) raise exceptions.ConfigurationException(msg) else: _log.info("The configuration file, {}, does not exist.".format(config_path)) self.update(config) self._validate() return self
python
def load_config(self, config_path=None): """ Load application configuration from a file and merge it with the default configuration. If the ``FEDORA_MESSAGING_CONF`` environment variable is set to a filesystem path, the configuration will be loaded from that location. Otherwise, the path defaults to ``/etc/fedora-messaging/config.toml``. """ self.loaded = True config = copy.deepcopy(DEFAULTS) if config_path is None: if "FEDORA_MESSAGING_CONF" in os.environ: config_path = os.environ["FEDORA_MESSAGING_CONF"] else: config_path = "/etc/fedora-messaging/config.toml" if os.path.exists(config_path): _log.info("Loading configuration from {}".format(config_path)) with open(config_path) as fd: try: file_config = toml.load(fd) for key in file_config: config[key.lower()] = file_config[key] except toml.TomlDecodeError as e: msg = "Failed to parse {}: error at line {}, column {}: {}".format( config_path, e.lineno, e.colno, e.msg ) raise exceptions.ConfigurationException(msg) else: _log.info("The configuration file, {}, does not exist.".format(config_path)) self.update(config) self._validate() return self
[ "def", "load_config", "(", "self", ",", "config_path", "=", "None", ")", ":", "self", ".", "loaded", "=", "True", "config", "=", "copy", ".", "deepcopy", "(", "DEFAULTS", ")", "if", "config_path", "is", "None", ":", "if", "\"FEDORA_MESSAGING_CONF\"", "in", "os", ".", "environ", ":", "config_path", "=", "os", ".", "environ", "[", "\"FEDORA_MESSAGING_CONF\"", "]", "else", ":", "config_path", "=", "\"/etc/fedora-messaging/config.toml\"", "if", "os", ".", "path", ".", "exists", "(", "config_path", ")", ":", "_log", ".", "info", "(", "\"Loading configuration from {}\"", ".", "format", "(", "config_path", ")", ")", "with", "open", "(", "config_path", ")", "as", "fd", ":", "try", ":", "file_config", "=", "toml", ".", "load", "(", "fd", ")", "for", "key", "in", "file_config", ":", "config", "[", "key", ".", "lower", "(", ")", "]", "=", "file_config", "[", "key", "]", "except", "toml", ".", "TomlDecodeError", "as", "e", ":", "msg", "=", "\"Failed to parse {}: error at line {}, column {}: {}\"", ".", "format", "(", "config_path", ",", "e", ".", "lineno", ",", "e", ".", "colno", ",", "e", ".", "msg", ")", "raise", "exceptions", ".", "ConfigurationException", "(", "msg", ")", "else", ":", "_log", ".", "info", "(", "\"The configuration file, {}, does not exist.\"", ".", "format", "(", "config_path", ")", ")", "self", ".", "update", "(", "config", ")", "self", ".", "_validate", "(", ")", "return", "self" ]
Load application configuration from a file and merge it with the default configuration. If the ``FEDORA_MESSAGING_CONF`` environment variable is set to a filesystem path, the configuration will be loaded from that location. Otherwise, the path defaults to ``/etc/fedora-messaging/config.toml``.
[ "Load", "application", "configuration", "from", "a", "file", "and", "merge", "it", "with", "the", "default", "configuration", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/config.py#L493-L528
train
Load application configuration from a file and merge it with the default configuration.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,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XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\065' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(54) + chr(0b11001 + 0o36), 63162 - 63154), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + '\064' + chr(0b110000 + 0o0), 0b1000), nzTpIcepk0o8(chr(713 - 665) + '\x6f' + '\063' + chr(51), 0b1000), nzTpIcepk0o8(chr(1249 - 1201) + chr(0b1101111) + chr(1074 - 1024) + chr(50) + chr(0b101001 + 0o15), 64052 - 64044), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o37) + chr(53) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\x35' + chr(1524 - 1471), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b110001) + chr(1843 - 1795), 25051 - 25043), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(0b10111 + 0o34) + '\x30' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + chr(0b100010 + 0o21) + chr(48) + chr(0b110000), 22439 - 22431), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b111101 + 0o62) + chr(0b111 + 0o52) + chr(48) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\062', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(10758 - 10647) + chr(0b100 + 0o57) + '\x32' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b101001 + 0o11) + chr(51) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(1635 - 1581) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100100 + 0o17) + chr(0b100111 + 0o12) + chr(49), 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101001 + 0o6) + '\x31' + chr(0b110011) + chr(52), 41328 - 41320), nzTpIcepk0o8('\060' + chr(111) + chr(0b110111) + chr(0b10010 + 0o42), 20171 - 20163), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110101) + chr(0b11010 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3792 - 3681) + chr(590 - 541) + chr(0b110001) + '\062', 642 - 634), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + chr(49) + '\x33' + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(7681 - 7570) + chr(2210 - 2161) + chr(0b110010 + 0o5) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10 + 0o61) + chr(0b110110) + chr(1660 - 1608), 61544 - 61536), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b110100) + '\x34', 43992 - 43984), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b110110) + chr(54), 48450 - 48442), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(184 - 130) + chr(49), 42580 - 42572), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + '\062' + '\x36' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(0b100000 + 0o25) + chr(0b110010 + 0o5), 8), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(50) + chr(2090 - 2042), 27826 - 27818), nzTpIcepk0o8('\060' + chr(0b10 + 0o155) + chr(49) + chr(2960 - 2905) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(587 - 538), 0b1000), nzTpIcepk0o8(chr(48) + chr(688 - 577) + chr(0b10111 + 0o33) + chr(982 - 928) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1678 - 1629) + chr(2552 - 2499) + chr(688 - 640), 33315 - 33307), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100111 + 0o13) + chr(0b110100) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(10071 - 9960) + chr(1943 - 1892) + chr(0b110000 + 0o7) + chr(0b110000), 57975 - 57967), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\062' + chr(1762 - 1713) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(50) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(0b110010) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(852 - 804) + '\157' + '\062' + chr(0b10110 + 0o35) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b110101), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2228 - 2180) + chr(111) + '\065' + chr(0b101101 + 0o3), 62973 - 62965)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x01'), '\144' + chr(0b100000 + 0o105) + chr(0b111110 + 0o45) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(11585 - 11468) + chr(0b111011 + 0o71) + chr(102) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def s3cG7WT6g3Gb(hXMPsSrOQzbh, eFZFsLa37Ix9=None): hXMPsSrOQzbh.E5UqV79Xig4O = nzTpIcepk0o8('\x30' + chr(111) + chr(0b1111 + 0o42), 19482 - 19474) kgkKUcD36lls = aZTCj4v5QdfO.deepcopy(mYDtAE9iRJ5f) if eFZFsLa37Ix9 is None: if roI3spqORKae(ES5oEprVxulp(b'i\xb2\xa4T\xc4\xaf\xf2\x85\x80\x93\x12K\x91\xd48\x8e\x03\x7f\xa0\x04\x19'), '\x64' + chr(101) + chr(2143 - 2044) + chr(0b1101111) + chr(100) + chr(7991 - 7890))(chr(2117 - 2000) + chr(12440 - 12324) + chr(0b1100110) + '\x2d' + chr(0b111000)) in roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'f\xc4\x8cL\xef\xad\x9b\x97\x95\x9f\x0cE'), chr(0b1100100) + chr(4540 - 4439) + chr(4687 - 4588) + '\x6f' + chr(7201 - 7101) + chr(10134 - 10033))(chr(7469 - 7352) + '\164' + '\146' + chr(1894 - 1849) + '\x38')): eFZFsLa37Ix9 = aHUqKstZLeS6.I3lWyC6_P_MO[roI3spqORKae(ES5oEprVxulp(b'i\xb2\xa4T\xc4\xaf\xf2\x85\x80\x93\x12K\x91\xd48\x8e\x03\x7f\xa0\x04\x19'), '\x64' + '\x65' + chr(0b11 + 0o140) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(996 - 940))] else: eFZFsLa37Ix9 = roI3spqORKae(ES5oEprVxulp(b"\x00\x92\x94x\xb9\x88\xc8\xac\xaa\xb2 '\xbb\xf8\x05\xba=[\x86$8T\x97\x0bXW\xd8\x88\xfe\n~\xda\x04"), chr(0b111110 + 0o46) + chr(101) + chr(0b10010 + 0o121) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(117) + chr(9822 - 9706) + chr(0b1100110) + chr(0b10101 + 0o30) + '\x38') if roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'U\xa4\xa9b\xf8\xbe\xd8\x8d\xb3\xac\x10>'), '\144' + chr(101) + chr(2997 - 2898) + '\157' + chr(0b110011 + 0o61) + chr(2111 - 2010))(chr(0b1110101) + chr(0b1001110 + 0o46) + '\146' + chr(45) + chr(0b111000)))(eFZFsLa37Ix9): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'F\x8f\xaec\xaf\xa2\xda\x97\xf4\xa73E'), '\x64' + chr(101) + chr(568 - 469) + '\157' + '\x64' + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(0b10100 + 0o44)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'c\x98\x81\x7f\xff\x80\xca\xe8\xa6\xaf/l\xbf\xfa\x03\xbb=H\x86%1[\x92\x16Y\\\x91\x94\xad'), chr(2105 - 2005) + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(3959 - 3858))(chr(117) + chr(0b1110100) + chr(0b1011110 + 0o10) + chr(0b100 + 0o51) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'^\xc4\xd3P\xd1\xdd\xcb\xa7\x94\x9f\x02@'), '\144' + chr(0b110001 + 0o64) + chr(2475 - 2376) + '\157' + chr(100) + '\145')(chr(0b1110101) + chr(0b111011 + 0o71) + chr(0b1100110) + '\x2d' + chr(56)))(eFZFsLa37Ix9)) with DnU3Rq9N5ala(eFZFsLa37Ix9) as RW6jRKOlF6C5: try: ygDP_VQ49ABA = L_EkpNfrD1ja.ZERsdc7c1d8E(RW6jRKOlF6C5) for QYodcsDtoGq7 in ygDP_VQ49ABA: kgkKUcD36lls[QYodcsDtoGq7.Xn8ENWMZdIRt()] = ygDP_VQ49ABA[QYodcsDtoGq7] except roI3spqORKae(L_EkpNfrD1ja, roI3spqORKae(ES5oEprVxulp(b'{\x98\x8dw\xd2\x8b\xce\xa7\xa1\xa5\x04x\xa4\xf2\x04'), '\x64' + '\x65' + chr(0b1100011) + chr(111) + chr(2821 - 2721) + chr(0b1100101))(chr(117) + '\x74' + '\x66' + chr(1468 - 1423) + chr(0b111000))) as wgf0sgcu_xPL: sldzbHve8G1S = roI3spqORKae(ES5oEprVxulp(b"i\x96\x89w\xf3\x8a\x8d\xbc\xaa\xe01k\xa4\xee\x13\xe9'A\xd5j:\t\x86\x0bD\x11\xd0\x9b\xf0\x12x\xd9\r\x81\x83\xf4{0\xffzC\x82\x8du\xb6\x95\xd0\xf2\xe5\xbb<"), chr(0b1010 + 0o132) + '\145' + '\143' + chr(0b1101111) + '\x64' + chr(8838 - 8737))(chr(0b100011 + 0o122) + chr(116) + chr(0b1100110) + chr(0b100011 + 0o12) + '\070').q33KG3foQ_CJ(eFZFsLa37Ix9, wgf0sgcu_xPL.soyUrUW37Gvb, wgf0sgcu_xPL.colno, wgf0sgcu_xPL.sldzbHve8G1S) raise roI3spqORKae(cXP3hZV0ntWo, roI3spqORKae(ES5oEprVxulp(b'l\x98\x8e}\xff\x89\xd8\xba\xa4\xb4(e\xb8\xd8\x0e\xaa9L\x9b#0\x15'), chr(100) + chr(0b1100101) + chr(6505 - 6406) + chr(4558 - 4447) + chr(0b110110 + 0o56) + chr(0b1011011 + 0o12))(chr(117) + chr(607 - 491) + chr(0b100110 + 0o100) + '\x2d' + '\x38'))(sldzbHve8G1S) else: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'F\x8f\xaec\xaf\xa2\xda\x97\xf4\xa73E'), '\x64' + '\x65' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b1001100 + 0o31))('\x75' + '\x74' + '\x66' + chr(0b101101) + '\x38'))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'{\x9f\x85;\xf5\x81\xc3\xae\xac\xa74x\xb7\xe9\x1f\xa62\x1c\x89#3\x1e\xd8DML\x9d\xcf\xb4\x11t\xc4H\xcf\x97\xfdwu\xe4|\\\x83\xce'), '\144' + chr(0b1010 + 0o133) + chr(0b11 + 0o140) + chr(1673 - 1562) + '\144' + '\145')('\165' + chr(116) + '\x66' + '\x2d' + chr(0b110010 + 0o6)), roI3spqORKae(ES5oEprVxulp(b'^\xc4\xd3P\xd1\xdd\xcb\xa7\x94\x9f\x02@'), '\144' + chr(3562 - 3461) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + '\164' + chr(0b1100110) + chr(0b10110 + 0o27) + chr(56)))(eFZFsLa37Ix9)) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'e\xa8\x8b)\xdf\xb7\xef\xf9\xa6\xa50d'), '\144' + chr(0b1011 + 0o132) + '\x63' + chr(3684 - 3573) + chr(0b100111 + 0o75) + chr(0b1001111 + 0o26))(chr(117) + chr(0b1101101 + 0o7) + chr(102) + chr(576 - 531) + chr(0b111000)))(kgkKUcD36lls) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'p\x81\x81w\xff\x8a\xcc\xbc\xa0'), '\x64' + chr(207 - 106) + '\143' + chr(0b1101111) + chr(4013 - 3913) + '\x65')('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(2026 - 1970)))() return hXMPsSrOQzbh
fedora-infra/fedora-messaging
fedora_messaging/twisted/service.py
_ssl_context_factory
def _ssl_context_factory(parameters): """ Produce a Twisted SSL context object from a pika connection parameter object. This is necessary as Twisted manages the connection, not Pika. Args: parameters (pika.ConnectionParameters): The connection parameters built from the fedora_messaging configuration. """ client_cert = None ca_cert = None key = config.conf["tls"]["keyfile"] cert = config.conf["tls"]["certfile"] ca_file = config.conf["tls"]["ca_cert"] if ca_file: with open(ca_file, "rb") as fd: # Open it in binary mode since otherwise Twisted will immediately # re-encode it as ASCII, which won't work if the cert bundle has # comments that can't be encoded with ASCII. ca_cert = ssl.Certificate.loadPEM(fd.read()) if key and cert: # Note that _configure_tls_parameters sets the auth mode to EXTERNAL # if both key and cert are defined, so we don't need to do that here. with open(key) as fd: client_keypair = fd.read() with open(cert) as fd: client_keypair += fd.read() client_cert = ssl.PrivateCertificate.loadPEM(client_keypair) hostname = parameters.host if not isinstance(hostname, six.text_type): # Twisted requires the hostname as decoded text, which it isn't in Python 2 # Decode with the system encoding since this came from the config file. Die, # Python 2, die. hostname = hostname.decode(locale.getdefaultlocale()[1]) try: context_factory = ssl.optionsForClientTLS( hostname, trustRoot=ca_cert or ssl.platformTrust(), clientCertificate=client_cert, extraCertificateOptions={"raiseMinimumTo": ssl.TLSVersion.TLSv1_2}, ) except AttributeError: # Twisted 12.2 path for EL7 :( context_factory = ssl.CertificateOptions( certificate=client_cert.original, privateKey=client_cert.privateKey.original, caCerts=[ca_cert.original] or ssl.platformTrust(), verify=True, requireCertificate=True, verifyOnce=False, enableSessions=False, ) return context_factory
python
def _ssl_context_factory(parameters): """ Produce a Twisted SSL context object from a pika connection parameter object. This is necessary as Twisted manages the connection, not Pika. Args: parameters (pika.ConnectionParameters): The connection parameters built from the fedora_messaging configuration. """ client_cert = None ca_cert = None key = config.conf["tls"]["keyfile"] cert = config.conf["tls"]["certfile"] ca_file = config.conf["tls"]["ca_cert"] if ca_file: with open(ca_file, "rb") as fd: # Open it in binary mode since otherwise Twisted will immediately # re-encode it as ASCII, which won't work if the cert bundle has # comments that can't be encoded with ASCII. ca_cert = ssl.Certificate.loadPEM(fd.read()) if key and cert: # Note that _configure_tls_parameters sets the auth mode to EXTERNAL # if both key and cert are defined, so we don't need to do that here. with open(key) as fd: client_keypair = fd.read() with open(cert) as fd: client_keypair += fd.read() client_cert = ssl.PrivateCertificate.loadPEM(client_keypair) hostname = parameters.host if not isinstance(hostname, six.text_type): # Twisted requires the hostname as decoded text, which it isn't in Python 2 # Decode with the system encoding since this came from the config file. Die, # Python 2, die. hostname = hostname.decode(locale.getdefaultlocale()[1]) try: context_factory = ssl.optionsForClientTLS( hostname, trustRoot=ca_cert or ssl.platformTrust(), clientCertificate=client_cert, extraCertificateOptions={"raiseMinimumTo": ssl.TLSVersion.TLSv1_2}, ) except AttributeError: # Twisted 12.2 path for EL7 :( context_factory = ssl.CertificateOptions( certificate=client_cert.original, privateKey=client_cert.privateKey.original, caCerts=[ca_cert.original] or ssl.platformTrust(), verify=True, requireCertificate=True, verifyOnce=False, enableSessions=False, ) return context_factory
[ "def", "_ssl_context_factory", "(", "parameters", ")", ":", "client_cert", "=", "None", "ca_cert", "=", "None", "key", "=", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"keyfile\"", "]", "cert", "=", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"certfile\"", "]", "ca_file", "=", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"ca_cert\"", "]", "if", "ca_file", ":", "with", "open", "(", "ca_file", ",", "\"rb\"", ")", "as", "fd", ":", "# Open it in binary mode since otherwise Twisted will immediately", "# re-encode it as ASCII, which won't work if the cert bundle has", "# comments that can't be encoded with ASCII.", "ca_cert", "=", "ssl", ".", "Certificate", ".", "loadPEM", "(", "fd", ".", "read", "(", ")", ")", "if", "key", "and", "cert", ":", "# Note that _configure_tls_parameters sets the auth mode to EXTERNAL", "# if both key and cert are defined, so we don't need to do that here.", "with", "open", "(", "key", ")", "as", "fd", ":", "client_keypair", "=", "fd", ".", "read", "(", ")", "with", "open", "(", "cert", ")", "as", "fd", ":", "client_keypair", "+=", "fd", ".", "read", "(", ")", "client_cert", "=", "ssl", ".", "PrivateCertificate", ".", "loadPEM", "(", "client_keypair", ")", "hostname", "=", "parameters", ".", "host", "if", "not", "isinstance", "(", "hostname", ",", "six", ".", "text_type", ")", ":", "# Twisted requires the hostname as decoded text, which it isn't in Python 2", "# Decode with the system encoding since this came from the config file. Die,", "# Python 2, die.", "hostname", "=", "hostname", ".", "decode", "(", "locale", ".", "getdefaultlocale", "(", ")", "[", "1", "]", ")", "try", ":", "context_factory", "=", "ssl", ".", "optionsForClientTLS", "(", "hostname", ",", "trustRoot", "=", "ca_cert", "or", "ssl", ".", "platformTrust", "(", ")", ",", "clientCertificate", "=", "client_cert", ",", "extraCertificateOptions", "=", "{", "\"raiseMinimumTo\"", ":", "ssl", ".", "TLSVersion", ".", "TLSv1_2", "}", ",", ")", "except", "AttributeError", ":", "# Twisted 12.2 path for EL7 :(", "context_factory", "=", "ssl", ".", "CertificateOptions", "(", "certificate", "=", "client_cert", ".", "original", ",", "privateKey", "=", "client_cert", ".", "privateKey", ".", "original", ",", "caCerts", "=", "[", "ca_cert", ".", "original", "]", "or", "ssl", ".", "platformTrust", "(", ")", ",", "verify", "=", "True", ",", "requireCertificate", "=", "True", ",", "verifyOnce", "=", "False", ",", "enableSessions", "=", "False", ",", ")", "return", "context_factory" ]
Produce a Twisted SSL context object from a pika connection parameter object. This is necessary as Twisted manages the connection, not Pika. Args: parameters (pika.ConnectionParameters): The connection parameters built from the fedora_messaging configuration.
[ "Produce", "a", "Twisted", "SSL", "context", "object", "from", "a", "pika", "connection", "parameter", "object", ".", "This", "is", "necessary", "as", "Twisted", "manages", "the", "connection", "not", "Pika", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/service.py#L194-L248
train
Generates a Twisted SSL context object from a pika connection parameter object.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq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JNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(6328 - 6217) + '\062' + chr(0b101001 + 0o13) + '\066', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\x32' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(849 - 798) + chr(51), 27593 - 27585), nzTpIcepk0o8(chr(1467 - 1419) + '\x6f' + chr(0b110001) + '\065' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(579 - 527) + chr(0b101011 + 0o5), 23863 - 23855), nzTpIcepk0o8(chr(825 - 777) + '\x6f' + '\x31' + '\066' + chr(0b110010 + 0o5), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110010) + '\067', 44525 - 44517), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b1101 + 0o46) + chr(0b10010 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\060' + chr(0b11110 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110100) + chr(0b10100 + 0o40), 46918 - 46910), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(10825 - 10714) + '\061' + '\060' + chr(0b100 + 0o60), 0o10), nzTpIcepk0o8(chr(1948 - 1900) + chr(111) + '\063' + '\x35' + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(978 - 924) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b110111) + '\x36', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b111 + 0o55) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(1316 - 1265) + '\x32', 0b1000), nzTpIcepk0o8(chr(2074 - 2026) + chr(111) + chr(50) + chr(1211 - 1162) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(10552 - 10441) + chr(0b100101 + 0o16) + chr(0b110011) + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + '\063' + chr(0b110011) + chr(49), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(10033 - 9922) + '\x31' + '\064' + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(50) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(52) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(2437 - 2385) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(1170 - 1118) + chr(49), 63361 - 63353), nzTpIcepk0o8(chr(2110 - 2062) + chr(0b1101111) + '\062' + '\x31' + '\062', 54600 - 54592), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101 + 0o55) + '\x32', 49270 - 49262), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b110101) + chr(1894 - 1841), 12063 - 12055), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(2082 - 2031) + chr(0b110111), 34785 - 34777), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b11110 + 0o22) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + '\157' + '\063' + '\063' + chr(0b110110), 46937 - 46929), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + '\x32' + chr(48) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(0b100000 + 0o22), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b10110 + 0o34) + chr(51) + chr(49), 50430 - 50422), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(50) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(1058 - 1010) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(50), 22532 - 22524), nzTpIcepk0o8(chr(48) + chr(4545 - 4434) + chr(0b110010) + '\x30' + chr(617 - 564), 40671 - 40663), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(53) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\067' + chr(1699 - 1651), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(9331 - 9220) + chr(53) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x88'), chr(0b1100100) + chr(0b111101 + 0o50) + chr(1707 - 1608) + chr(0b1101111) + chr(0b100100 + 0o100) + chr(0b1100101))(chr(3105 - 2988) + chr(5553 - 5437) + '\x66' + chr(0b100011 + 0o12) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def HlQiIDFdn1jt(gSg1sCFIUOMb): TlICiVONESKn = None HcOAfLr4elsw = None QYodcsDtoGq7 = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xd28\xa8'), chr(100) + chr(584 - 483) + chr(1571 - 1472) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(102) + chr(0b101 + 0o50) + chr(56))][roI3spqORKae(ES5oEprVxulp(b'\xcd1\xa2\x0e\x7f\x0c\x12'), '\144' + chr(0b110011 + 0o62) + chr(0b1010000 + 0o23) + '\157' + chr(100) + chr(0b1100101))('\x75' + '\x74' + chr(1783 - 1681) + chr(45) + chr(262 - 206))] ux0FimK1GYCy = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xd28\xa8'), chr(0b1100100) + '\145' + '\x63' + '\x6f' + '\x64' + chr(101))('\x75' + '\x74' + '\146' + '\x2d' + chr(56))][roI3spqORKae(ES5oEprVxulp(b'\xc51\xa9\x1cp\t\x1b\xb2'), '\x64' + chr(3451 - 3350) + '\143' + '\x6f' + '\144' + chr(0b1100101))('\x75' + '\164' + '\146' + chr(1628 - 1583) + chr(56))] v0gTFE8NPExm = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xd28\xa8'), chr(6332 - 6232) + chr(4521 - 4420) + chr(0b110100 + 0o57) + chr(0b1101111) + '\144' + chr(372 - 271))(chr(117) + chr(0b111 + 0o155) + '\x66' + '\x2d' + '\x38')][roI3spqORKae(ES5oEprVxulp(b'\xc55\x84\x0bs\x12\x03'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(5699 - 5588) + chr(0b1010111 + 0o15) + chr(101))(chr(0b1110101) + '\x74' + '\x66' + chr(2022 - 1977) + chr(0b111000))] if v0gTFE8NPExm: with DnU3Rq9N5ala(v0gTFE8NPExm, roI3spqORKae(ES5oEprVxulp(b'\xd46'), chr(0b1100100) + '\145' + chr(99) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + chr(0b111000 + 0o74) + chr(0b1001011 + 0o33) + chr(0b0 + 0o55) + '\070')) as RW6jRKOlF6C5: HcOAfLr4elsw = hmHv7r16uAJe.Certificate.loadPEM(RW6jRKOlF6C5.eoXknH7XUn7m()) if QYodcsDtoGq7 and ux0FimK1GYCy: with DnU3Rq9N5ala(QYodcsDtoGq7) as RW6jRKOlF6C5: _L17Gg7ZaeRh = RW6jRKOlF6C5.eoXknH7XUn7m() with DnU3Rq9N5ala(ux0FimK1GYCy) as RW6jRKOlF6C5: _L17Gg7ZaeRh += RW6jRKOlF6C5.eoXknH7XUn7m() TlICiVONESKn = hmHv7r16uAJe.PrivateCertificate.loadPEM(_L17Gg7ZaeRh) NGLFNiXb9IZu = gSg1sCFIUOMb.UcZofMadI5hD if not suIjIS24Zkqw(NGLFNiXb9IZu, roI3spqORKae(YVS_F7_wWn_o, roI3spqORKae(ES5oEprVxulp(b'\xd21\xa3\x1cI\x14\x0e\xa7\x7f'), chr(5933 - 5833) + chr(0b1100101) + chr(0b1100011) + chr(7965 - 7854) + '\144' + chr(517 - 416))(chr(117) + chr(116) + '\x66' + chr(1296 - 1251) + chr(0b111000)))): NGLFNiXb9IZu = NGLFNiXb9IZu.lfbFsdWlT3MB(MIRLOzmYqiJ8.getdefaultlocale()[nzTpIcepk0o8(chr(0b110000) + chr(0b11 + 0o154) + '\061', ord("\x08"))]) try: dKXXDugyuI7u = hmHv7r16uAJe.optionsForClientTLS(NGLFNiXb9IZu, trustRoot=HcOAfLr4elsw or hmHv7r16uAJe.platformTrust(), clientCertificate=TlICiVONESKn, extraCertificateOptions={roI3spqORKae(ES5oEprVxulp(b'\xd45\xb2\x1bs-\x1e\xb9s*\x11)\xbb\xdd'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(0b1011010 + 0o33) + '\x74' + '\146' + chr(0b101000 + 0o5) + chr(56)): hmHv7r16uAJe.TLSVersion.TLSv1_2}) except bIsJhlpYrrU2: dKXXDugyuI7u = hmHv7r16uAJe.CertificateOptions(certificate=TlICiVONESKn.yUal1nSvXhqY, privateKey=TlICiVONESKn.privateKey.yUal1nSvXhqY, caCerts=[HcOAfLr4elsw.yUal1nSvXhqY] or hmHv7r16uAJe.platformTrust(), verify=nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31', 8), requireCertificate=nzTpIcepk0o8(chr(798 - 750) + chr(0b1101111) + chr(2003 - 1954), 8), verifyOnce=nzTpIcepk0o8('\060' + '\157' + '\060', ord("\x08")), enableSessions=nzTpIcepk0o8(chr(1824 - 1776) + '\157' + chr(0b10101 + 0o33), 8)) return dKXXDugyuI7u
fedora-infra/fedora-messaging
fedora_messaging/twisted/service.py
FedoraMessagingServiceV2.stopService
def stopService(self): """ Gracefully stop the service. Returns: defer.Deferred: a Deferred which is triggered when the service has finished shutting down. """ self._service.factory.stopTrying() yield self._service.factory.stopFactory() yield service.MultiService.stopService(self)
python
def stopService(self): """ Gracefully stop the service. Returns: defer.Deferred: a Deferred which is triggered when the service has finished shutting down. """ self._service.factory.stopTrying() yield self._service.factory.stopFactory() yield service.MultiService.stopService(self)
[ "def", "stopService", "(", "self", ")", ":", "self", ".", "_service", ".", "factory", ".", "stopTrying", "(", ")", "yield", "self", ".", "_service", ".", "factory", ".", "stopFactory", "(", ")", "yield", "service", ".", "MultiService", ".", "stopService", "(", "self", ")" ]
Gracefully stop the service. Returns: defer.Deferred: a Deferred which is triggered when the service has finished shutting down.
[ "Gracefully", "stop", "the", "service", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/twisted/service.py#L181-L191
train
Gracefully stop the service.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9y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ingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1442 - 1394) + chr(0b1101111) + chr(0b110011) + chr(0b110000) + chr(0b10111 + 0o35), 0o10), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + '\x32' + '\062' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + '\061' + chr(50) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(315 - 266) + chr(1714 - 1662) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(52) + chr(51), 9011 - 9003), nzTpIcepk0o8('\x30' + '\157' + chr(2019 - 1969) + chr(0b11111 + 0o26) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(2074 - 2023) + '\x35' + chr(0b110010 + 0o1), 0b1000), nzTpIcepk0o8(chr(959 - 911) + '\157' + chr(0b110100) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b110001 + 0o4) + '\x35', 0b1000), nzTpIcepk0o8(chr(1047 - 999) + '\157' + chr(50) + chr(53) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(51) + chr(0b110 + 0o52) + chr(1917 - 1865), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\064' + '\x33', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b110001) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\x37' + '\x31', 39648 - 39640), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(10619 - 10508) + chr(525 - 475) + '\067' + chr(2218 - 2165), 9736 - 9728), nzTpIcepk0o8(chr(48) + chr(0b100111 + 0o110) + chr(49) + chr(1439 - 1385) + chr(54), 0b1000), nzTpIcepk0o8(chr(1064 - 1016) + '\157' + chr(0b110010) + chr(2593 - 2541) + chr(2588 - 2534), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b100101 + 0o14) + chr(0b101110 + 0o10), 9530 - 9522), nzTpIcepk0o8('\x30' + chr(5328 - 5217) + chr(53) + chr(0b11 + 0o61), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(406 - 351), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + '\x31' + '\x37' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8094 - 7983) + chr(49) + chr(0b110111) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000001 + 0o56) + chr(0b110001) + '\067' + chr(806 - 756), 0o10), nzTpIcepk0o8('\060' + chr(0b1001100 + 0o43) + chr(0b101001 + 0o14) + chr(0b1000 + 0o54), 8), nzTpIcepk0o8(chr(1653 - 1605) + chr(8207 - 8096) + chr(0b1100 + 0o51) + chr(788 - 740), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + chr(0b100101 + 0o22) + '\x37', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\x35' + chr(1320 - 1265), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\066' + chr(382 - 333), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(52) + chr(0b11100 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b1100 + 0o45) + '\066' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(8831 - 8720) + '\063' + '\063' + '\065', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(244 - 193) + chr(0b110000) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8472 - 8361) + '\063' + '\064' + '\062', 11396 - 11388), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + '\x31' + '\065' + '\063', 60389 - 60381), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(0b110001) + chr(0b110001) + chr(0b11011 + 0o32), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(50) + '\066', 17581 - 17573), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(2434 - 2383) + '\x37', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + '\x34' + chr(54), 39958 - 39950)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1431 - 1383) + '\x6f' + chr(461 - 408) + chr(0b100110 + 0o12), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xea'), chr(2604 - 2504) + chr(3729 - 3628) + '\143' + chr(0b1001101 + 0o42) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b111011 + 0o71) + chr(102) + chr(45) + chr(0b1011 + 0o55)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def UA_g9j3UUPgq(hXMPsSrOQzbh): roI3spqORKae(hXMPsSrOQzbh._service.factory, roI3spqORKae(ES5oEprVxulp(b'\xb7\xe2?\x17w\xda\x92L\xc3\xc8'), chr(0b1101 + 0o127) + chr(9762 - 9661) + chr(99) + chr(0b1010111 + 0o30) + chr(0b1 + 0o143) + chr(0b100110 + 0o77))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\055' + '\070'))() yield roI3spqORKae(hXMPsSrOQzbh._service.factory, roI3spqORKae(ES5oEprVxulp(b'\xb7\xe2?\x17e\xc9\x88Q\xc2\xdd\xbd'), chr(0b1100100) + chr(101) + chr(5139 - 5040) + chr(6778 - 6667) + chr(100) + chr(0b1100101))(chr(7160 - 7043) + '\164' + chr(0b1100010 + 0o4) + chr(45) + chr(56)))() yield roI3spqORKae(s3mEJkwJRqJG.MultiService, roI3spqORKae(ES5oEprVxulp(b'\xb7\xe2?\x17p\xcd\x99S\xc4\xcc\xa1'), '\x64' + chr(8275 - 8174) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(0b101000 + 0o5) + chr(0b111000)))(hXMPsSrOQzbh)
fedora-infra/fedora-messaging
fedora_messaging/_session.py
_configure_tls_parameters
def _configure_tls_parameters(parameters): """ Configure the pika connection parameters for TLS based on the configuration. This modifies the object provided to it. This accounts for whether or not the new API based on the standard library's SSLContext is available for pika. Args: parameters (pika.ConnectionParameters): The connection parameters to apply TLS connection settings to. """ cert = config.conf["tls"]["certfile"] key = config.conf["tls"]["keyfile"] if cert and key: _log.info( "Authenticating with server using x509 (certfile: %s, keyfile: %s)", cert, key, ) parameters.credentials = pika.credentials.ExternalCredentials() else: cert, key = None, None if SSLOptions is None: parameters.ssl = True parameters.ssl_options = { "keyfile": key, "certfile": cert, "ca_certs": config.conf["tls"]["ca_cert"], "cert_reqs": ssl.CERT_REQUIRED, "ssl_version": ssl.PROTOCOL_TLSv1_2, } else: ssl_context = ssl.create_default_context() if config.conf["tls"]["ca_cert"]: try: ssl_context.load_verify_locations(cafile=config.conf["tls"]["ca_cert"]) except ssl.SSLError as e: raise ConfigurationException( 'The "ca_cert" setting in the "tls" section is invalid ({})'.format( e ) ) ssl_context.options |= ssl.OP_NO_SSLv2 ssl_context.options |= ssl.OP_NO_SSLv3 ssl_context.options |= ssl.OP_NO_TLSv1 ssl_context.options |= ssl.OP_NO_TLSv1_1 ssl_context.verify_mode = ssl.CERT_REQUIRED ssl_context.check_hostname = True if cert and key: try: ssl_context.load_cert_chain(cert, key) except ssl.SSLError as e: raise ConfigurationException( 'The "keyfile" setting in the "tls" section is invalid ({})'.format( e ) ) parameters.ssl_options = SSLOptions( ssl_context, server_hostname=parameters.host )
python
def _configure_tls_parameters(parameters): """ Configure the pika connection parameters for TLS based on the configuration. This modifies the object provided to it. This accounts for whether or not the new API based on the standard library's SSLContext is available for pika. Args: parameters (pika.ConnectionParameters): The connection parameters to apply TLS connection settings to. """ cert = config.conf["tls"]["certfile"] key = config.conf["tls"]["keyfile"] if cert and key: _log.info( "Authenticating with server using x509 (certfile: %s, keyfile: %s)", cert, key, ) parameters.credentials = pika.credentials.ExternalCredentials() else: cert, key = None, None if SSLOptions is None: parameters.ssl = True parameters.ssl_options = { "keyfile": key, "certfile": cert, "ca_certs": config.conf["tls"]["ca_cert"], "cert_reqs": ssl.CERT_REQUIRED, "ssl_version": ssl.PROTOCOL_TLSv1_2, } else: ssl_context = ssl.create_default_context() if config.conf["tls"]["ca_cert"]: try: ssl_context.load_verify_locations(cafile=config.conf["tls"]["ca_cert"]) except ssl.SSLError as e: raise ConfigurationException( 'The "ca_cert" setting in the "tls" section is invalid ({})'.format( e ) ) ssl_context.options |= ssl.OP_NO_SSLv2 ssl_context.options |= ssl.OP_NO_SSLv3 ssl_context.options |= ssl.OP_NO_TLSv1 ssl_context.options |= ssl.OP_NO_TLSv1_1 ssl_context.verify_mode = ssl.CERT_REQUIRED ssl_context.check_hostname = True if cert and key: try: ssl_context.load_cert_chain(cert, key) except ssl.SSLError as e: raise ConfigurationException( 'The "keyfile" setting in the "tls" section is invalid ({})'.format( e ) ) parameters.ssl_options = SSLOptions( ssl_context, server_hostname=parameters.host )
[ "def", "_configure_tls_parameters", "(", "parameters", ")", ":", "cert", "=", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"certfile\"", "]", "key", "=", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"keyfile\"", "]", "if", "cert", "and", "key", ":", "_log", ".", "info", "(", "\"Authenticating with server using x509 (certfile: %s, keyfile: %s)\"", ",", "cert", ",", "key", ",", ")", "parameters", ".", "credentials", "=", "pika", ".", "credentials", ".", "ExternalCredentials", "(", ")", "else", ":", "cert", ",", "key", "=", "None", ",", "None", "if", "SSLOptions", "is", "None", ":", "parameters", ".", "ssl", "=", "True", "parameters", ".", "ssl_options", "=", "{", "\"keyfile\"", ":", "key", ",", "\"certfile\"", ":", "cert", ",", "\"ca_certs\"", ":", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"ca_cert\"", "]", ",", "\"cert_reqs\"", ":", "ssl", ".", "CERT_REQUIRED", ",", "\"ssl_version\"", ":", "ssl", ".", "PROTOCOL_TLSv1_2", ",", "}", "else", ":", "ssl_context", "=", "ssl", ".", "create_default_context", "(", ")", "if", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"ca_cert\"", "]", ":", "try", ":", "ssl_context", ".", "load_verify_locations", "(", "cafile", "=", "config", ".", "conf", "[", "\"tls\"", "]", "[", "\"ca_cert\"", "]", ")", "except", "ssl", ".", "SSLError", "as", "e", ":", "raise", "ConfigurationException", "(", "'The \"ca_cert\" setting in the \"tls\" section is invalid ({})'", ".", "format", "(", "e", ")", ")", "ssl_context", ".", "options", "|=", "ssl", ".", "OP_NO_SSLv2", "ssl_context", ".", "options", "|=", "ssl", ".", "OP_NO_SSLv3", "ssl_context", ".", "options", "|=", "ssl", ".", "OP_NO_TLSv1", "ssl_context", ".", "options", "|=", "ssl", ".", "OP_NO_TLSv1_1", "ssl_context", ".", "verify_mode", "=", "ssl", ".", "CERT_REQUIRED", "ssl_context", ".", "check_hostname", "=", "True", "if", "cert", "and", "key", ":", "try", ":", "ssl_context", ".", "load_cert_chain", "(", "cert", ",", "key", ")", "except", "ssl", ".", "SSLError", "as", "e", ":", "raise", "ConfigurationException", "(", "'The \"keyfile\" setting in the \"tls\" section is invalid ({})'", ".", "format", "(", "e", ")", ")", "parameters", ".", "ssl_options", "=", "SSLOptions", "(", "ssl_context", ",", "server_hostname", "=", "parameters", ".", "host", ")" ]
Configure the pika connection parameters for TLS based on the configuration. This modifies the object provided to it. This accounts for whether or not the new API based on the standard library's SSLContext is available for pika. Args: parameters (pika.ConnectionParameters): The connection parameters to apply TLS connection settings to.
[ "Configure", "the", "pika", "connection", "parameters", "for", "TLS", "based", "on", "the", "configuration", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L51-L112
train
Configure the TLS connection parameters for the current object.
GiP5xwVCF98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dwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b110001) + chr(0b110010), 48802 - 48794), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + chr(0b101011 + 0o6) + chr(0b1 + 0o64), 0b1000), nzTpIcepk0o8(chr(1572 - 1524) + chr(0b1000011 + 0o54) + chr(0b110101) + chr(0b110100), 16247 - 16239), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1385 - 1336) + chr(0b101111 + 0o10), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011 + 0o144) + '\x33' + chr(0b110011) + '\065', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + '\x32' + '\061' + '\x37', 0b1000), nzTpIcepk0o8(chr(84 - 36) + chr(0b101111 + 0o100) + chr(1537 - 1487) + '\060', 50532 - 50524), nzTpIcepk0o8(chr(1383 - 1335) + '\157' + '\063' + chr(55) + chr(1758 - 1710), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1042 - 992) + '\060' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(9744 - 9633) + '\062' + '\063' + chr(0b110010), 22937 - 22929), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(379 - 330) + '\x36' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b100000 + 0o22) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\x32' + '\064', 41690 - 41682), nzTpIcepk0o8(chr(48) + '\157' + chr(1990 - 1940) + chr(989 - 937) + chr(52), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100010 + 0o21) + chr(593 - 541), 43439 - 43431), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b110100) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(325 - 276) + '\063' + chr(0b101 + 0o57), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(2444 - 2394) + chr(55) + chr(0b110110), 8657 - 8649), nzTpIcepk0o8(chr(1974 - 1926) + chr(111) + chr(0b110010) + '\x36' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(50) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001011 + 0o44) + chr(288 - 237) + chr(0b1110 + 0o46) + chr(698 - 648), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(0b1011 + 0o54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52), 48387 - 48379), nzTpIcepk0o8(chr(306 - 258) + chr(111) + chr(146 - 97) + chr(0b110011) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(53) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110100 + 0o73) + '\x32' + '\064' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110111) + chr(1693 - 1642), 0o10), nzTpIcepk0o8(chr(658 - 610) + chr(0b1101111) + chr(50) + chr(52) + chr(0b10100 + 0o37), 8), nzTpIcepk0o8(chr(980 - 932) + '\157' + chr(0b110001) + chr(0b1011 + 0o47) + chr(0b11001 + 0o34), 55009 - 55001), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(4583 - 4472) + chr(49) + '\063' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + '\x34' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(1564 - 1514) + chr(0b110101) + chr(893 - 840), 0o10), nzTpIcepk0o8(chr(687 - 639) + chr(111) + chr(0b110101) + '\x34', 8), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110011) + chr(0b10000 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(11464 - 11353) + '\x33' + chr(882 - 831) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32', 40011 - 40003), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1010110 + 0o31) + chr(655 - 606) + chr(54) + chr(54), 8), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(798 - 747) + chr(0b11011 + 0o26) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011011 + 0o24) + '\062' + chr(0b110000) + '\x33', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1018 - 970) + chr(7424 - 7313) + '\065' + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa4'), chr(0b1011010 + 0o12) + '\145' + chr(0b110100 + 0o57) + chr(0b101100 + 0o103) + chr(0b1010000 + 0o24) + chr(101))('\x75' + '\164' + chr(102) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fyircJxJF9IO(gSg1sCFIUOMb): ux0FimK1GYCy = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xfea_'), chr(100) + '\x65' + chr(0b1100011) + chr(111) + chr(100) + '\x65')(chr(9690 - 9573) + chr(0b1110100) + chr(102) + '\055' + chr(0b111000))][roI3spqORKae(ES5oEprVxulp(b'\xe9h^{\xbb\xe6|\x9d'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101101 + 0o2) + chr(4145 - 4045) + '\x65')(chr(0b1100101 + 0o20) + chr(116) + chr(0b1100101 + 0o1) + chr(125 - 80) + chr(56))] QYodcsDtoGq7 = kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xfea_'), '\x64' + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101 + 0o0))(chr(0b101000 + 0o115) + chr(0b1110100) + '\x66' + chr(45) + chr(1924 - 1868))][roI3spqORKae(ES5oEprVxulp(b'\xe1hUi\xb4\xe3u'), chr(100) + '\145' + chr(8884 - 8785) + chr(0b101000 + 0o107) + chr(7372 - 7272) + chr(0b1100101))(chr(117) + chr(13240 - 13124) + chr(5306 - 5204) + chr(0b101101) + chr(0b1111 + 0o51))] if ux0FimK1GYCy and QYodcsDtoGq7: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xe3ubw\xe4\xc3g\xa7\xb7\xfd\x04\x9b'), '\144' + chr(4247 - 4146) + chr(6491 - 6392) + chr(4867 - 4756) + '\144' + '\x65')(chr(0b1101001 + 0o14) + '\x74' + '\x66' + chr(1898 - 1853) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xcbxXg\xb8\xe1d\x91\xe5\xfb\x02\xbd:\xc3<\x155\xca\xda\xb4\x912v+\x88\xd1>\x0e\xd0<4A\x8dTk\xec;V\xe4\xe0\xef\x7fXi\xb4\xe3u\xc2\xa6\xbf\x05\xf8t\xcfy\x1b:\xd7\xde\xf1\xd8w!.\xc4'), chr(100) + '\x65' + chr(0b1000111 + 0o34) + chr(0b1101111) + chr(8674 - 8574) + chr(101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b11100 + 0o21) + '\070'), ux0FimK1GYCy, QYodcsDtoGq7) gSg1sCFIUOMb.etGTkURizUB3 = HRawGMbkRJHa.credentials.ExternalCredentials() else: (ux0FimK1GYCy, QYodcsDtoGq7) = (None, None) if KS_ei9qoqv_3 is None: gSg1sCFIUOMb.hmHv7r16uAJe = nzTpIcepk0o8(chr(0b110000) + chr(9044 - 8933) + chr(0b10101 + 0o34), 47294 - 47286) gSg1sCFIUOMb.X5VDaQPndXx6 = {roI3spqORKae(ES5oEprVxulp(b'\xe1hUi\xb4\xe3u'), chr(0b111100 + 0o50) + chr(101) + '\x63' + '\157' + chr(0b1000111 + 0o35) + chr(101))('\165' + chr(116) + '\146' + '\x2d' + chr(0b1111 + 0o51)): QYodcsDtoGq7, roI3spqORKae(ES5oEprVxulp(b'\xe9h^{\xbb\xe6|\x9d'), chr(100) + chr(0b1001011 + 0o32) + chr(99) + '\x6f' + chr(100) + '\145')(chr(12994 - 12877) + '\164' + chr(0b1100110) + chr(45) + '\070'): ux0FimK1GYCy, roI3spqORKae(ES5oEprVxulp(b'\xe9lsl\xb8\xfdd\x8b'), chr(100) + '\145' + chr(0b1011 + 0o130) + chr(0b100010 + 0o115) + '\144' + chr(9770 - 9669))('\x75' + chr(0b100101 + 0o117) + '\146' + chr(697 - 652) + chr(0b111000)): kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xfea_'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(5162 - 5062) + chr(0b10101 + 0o120))('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(0b111000))][roI3spqORKae(ES5oEprVxulp(b'\xe9lsl\xb8\xfdd'), chr(0b10111 + 0o115) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(4292 - 4191))('\x75' + '\x74' + '\146' + chr(406 - 361) + '\070')], roI3spqORKae(ES5oEprVxulp(b'\xe9h^{\x82\xfdu\x89\xf5'), chr(0b110111 + 0o55) + '\x65' + chr(99) + '\x6f' + chr(0b1000001 + 0o43) + '\x65')(chr(0b1110101) + chr(4375 - 4259) + chr(6815 - 6713) + '\055' + chr(0b111000)): hmHv7r16uAJe.CERT_REQUIRED, roI3spqORKae(ES5oEprVxulp(b'\xf9~@P\xab\xeab\x8b\xef\xf5\x18'), '\144' + chr(4526 - 4425) + '\x63' + chr(0b1101111 + 0o0) + '\x64' + chr(0b111111 + 0o46))(chr(9788 - 9671) + chr(0b1110100) + chr(7554 - 7452) + chr(0b10 + 0o53) + chr(56)): hmHv7r16uAJe.PROTOCOL_TLSv1_2} else: MYGqWILRDXdb = hmHv7r16uAJe.create_default_context() if roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\xebH\x7f\\\xeb\xc8g\x80\xe9\xc0\x1e\x95'), chr(0b1001011 + 0o31) + '\145' + '\143' + chr(0b1101111) + chr(100) + chr(101))('\165' + '\x74' + chr(102) + chr(45) + chr(56)))[roI3spqORKae(ES5oEprVxulp(b'\xfea_'), '\x64' + '\x65' + chr(99) + chr(7608 - 7497) + chr(0b1100100) + '\145')('\165' + chr(0b1 + 0o163) + '\146' + chr(169 - 124) + chr(465 - 409))][roI3spqORKae(ES5oEprVxulp(b'\xe9lsl\xb8\xfdd'), '\x64' + chr(7017 - 6916) + chr(8002 - 7903) + '\x6f' + chr(0b110000 + 0o64) + '\x65')(chr(12010 - 11893) + chr(0b1110100) + '\146' + '\x2d' + chr(0b1101 + 0o53))]: try: roI3spqORKae(MYGqWILRDXdb, roI3spqORKae(ES5oEprVxulp(b'\xe6bMk\x82\xf9u\x8a\xef\xfc\x0f\x8b8\xcb\x7f\x03(\xd7\xdd\xfa\x91'), chr(4418 - 4318) + '\145' + chr(0b111 + 0o134) + chr(12052 - 11941) + chr(0b1100100) + chr(6041 - 5940))(chr(0b1000000 + 0o65) + chr(3526 - 3410) + chr(102) + chr(948 - 903) + '\x38'))(cafile=roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\xebH\x7f\\\xeb\xc8g\x80\xe9\xc0\x1e\x95'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1010001 + 0o36) + chr(705 - 605) + chr(0b1100101))(chr(117) + '\x74' + '\x66' + '\x2d' + chr(1428 - 1372)))[roI3spqORKae(ES5oEprVxulp(b'\xfea_'), '\144' + chr(6719 - 6618) + '\143' + chr(0b1101111) + chr(1016 - 916) + chr(101))(chr(7584 - 7467) + chr(8280 - 8164) + chr(102) + '\x2d' + chr(310 - 254))][roI3spqORKae(ES5oEprVxulp(b'\xe9lsl\xb8\xfdd'), '\x64' + '\x65' + chr(0b11000 + 0o113) + '\157' + chr(100) + chr(489 - 388))(chr(117) + chr(116) + chr(102) + chr(45) + chr(56))]) except roI3spqORKae(hmHv7r16uAJe, roI3spqORKae(ES5oEprVxulp(b'\xd9^`J\xaf\xfd\x7f\x8a'), chr(100) + chr(0b1100101) + chr(9737 - 9638) + '\x6f' + '\144' + chr(0b1100101))(chr(6035 - 5918) + '\164' + chr(7940 - 7838) + '\055' + '\x38')) as wgf0sgcu_xPL: raise IBMUt5z8is68(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xdeeI/\xff\xecq\xa7\xe5\xff\x04\xa0v\x84o\x07(\xca\xdb\xfa\x85wm3\xcd\xd7v\x1e\x83w.J\xde\x0e~\xafg\x15\xb8\xea\xe5c\x0cf\xae\xafy\x96\xf0\xfb\x1a\xbd0\x844\x19!\x97'), '\x64' + '\x65' + chr(411 - 312) + chr(2962 - 2851) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(9137 - 9021) + chr(0b100 + 0o142) + chr(407 - 362) + chr(0b110101 + 0o3)), roI3spqORKae(ES5oEprVxulp(b'\xfb>\x1fD\x9a\xbcv\x97\xd7\xc55\x9e'), '\144' + chr(9235 - 9134) + chr(0b110101 + 0o56) + '\x6f' + chr(0b1100100) + chr(0b111100 + 0o51))(chr(0b1110101) + '\x74' + chr(5751 - 5649) + chr(866 - 821) + '\070'))(wgf0sgcu_xPL)) MYGqWILRDXdb.gpUDAok9rMxr |= hmHv7r16uAJe.OP_NO_SSLv2 MYGqWILRDXdb.gpUDAok9rMxr |= hmHv7r16uAJe.OP_NO_SSLv3 MYGqWILRDXdb.gpUDAok9rMxr |= hmHv7r16uAJe.OP_NO_TLSv1 MYGqWILRDXdb.gpUDAok9rMxr |= hmHv7r16uAJe.OP_NO_TLSv1_1 MYGqWILRDXdb.CKBAbefgSQyC = hmHv7r16uAJe.CERT_REQUIRED MYGqWILRDXdb.Fd0N2zaWyeH6 = nzTpIcepk0o8(chr(2006 - 1958) + chr(0b1101111) + '\061', 8) if ux0FimK1GYCy and QYodcsDtoGq7: try: roI3spqORKae(MYGqWILRDXdb, roI3spqORKae(ES5oEprVxulp(b'\xe6bMk\x82\xecu\x8a\xf2\xc5\x15\xbc5\xcdr'), chr(100) + '\x65' + '\x63' + '\x6f' + chr(7156 - 7056) + '\x65')('\x75' + chr(0b1110100) + chr(0b111101 + 0o51) + '\x2d' + chr(0b111000)))(ux0FimK1GYCy, QYodcsDtoGq7) except roI3spqORKae(hmHv7r16uAJe, roI3spqORKae(ES5oEprVxulp(b'\xd9^`J\xaf\xfd\x7f\x8a'), chr(0b1100100) + chr(0b1010010 + 0o23) + chr(99) + chr(111) + chr(1886 - 1786) + chr(2174 - 2073))(chr(117) + chr(0b1110100) + chr(2779 - 2677) + chr(45) + chr(0b1111 + 0o51))) as wgf0sgcu_xPL: raise IBMUt5z8is68(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xdeeI/\xff\xe4u\x81\xe0\xf3\x1a\xb1v\x84o\x07(\xca\xdb\xfa\x85wm3\xcd\xd7v\x1e\x83w.J\xde\x0e~\xafg\x15\xb8\xea\xe5c\x0cf\xae\xafy\x96\xf0\xfb\x1a\xbd0\x844\x19!\x97'), chr(0b1100100) + chr(1352 - 1251) + '\143' + '\157' + chr(100) + chr(101))(chr(0b1110101) + chr(4219 - 4103) + '\x66' + '\x2d' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xfb>\x1fD\x9a\xbcv\x97\xd7\xc55\x9e'), chr(100) + '\145' + chr(6350 - 6251) + chr(2231 - 2120) + chr(4756 - 4656) + chr(0b1001011 + 0o32))(chr(4785 - 4668) + chr(116) + chr(9890 - 9788) + chr(45) + chr(0b1010 + 0o56)))(wgf0sgcu_xPL)) gSg1sCFIUOMb.X5VDaQPndXx6 = KS_ei9qoqv_3(MYGqWILRDXdb, server_hostname=gSg1sCFIUOMb.UcZofMadI5hD)
fedora-infra/fedora-messaging
fedora_messaging/_session.py
PublisherSession.publish
def publish(self, message, exchange=None): """ Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. >>> from fedora_messaging import _session, message >>> msg = message.Message(topic='test', body={'test':'message'}) >>> sess = session.BlockingSession() >>> sess.publish(msg) Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` Raises: PublishReturned: If the published message is rejected by the broker. ConnectionException: If a connection error occurs while publishing. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges """ message.validate() try: self._connect_and_publish(exchange, message) except (pika_errs.NackError, pika_errs.UnroutableError) as e: _log.warning("Message was rejected by the broker (%s)", str(e)) raise PublishReturned(reason=e) except (pika_errs.ConnectionClosed, pika_errs.AMQPChannelError): # Because this is a blocking connection (and thus can't heartbeat) # we might need to restart the connection. _log.info("Resetting connection to %s", self._parameters.host) self._connection = self._channel = None try: self._connect_and_publish(exchange, message) except (pika_errs.NackError, pika_errs.UnroutableError) as e: _log.warning("Message was rejected by the broker (%s)", str(e)) raise PublishReturned(reason=e) except pika_errs.AMQPError as e: _log.error(str(e)) if self._connection and self._connection.is_open: self._connection.close() raise ConnectionException(reason=e) except pika_errs.AMQPError as e: if self._connection and self._connection.is_open: self._connection.close() raise ConnectionException(reason=e)
python
def publish(self, message, exchange=None): """ Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. >>> from fedora_messaging import _session, message >>> msg = message.Message(topic='test', body={'test':'message'}) >>> sess = session.BlockingSession() >>> sess.publish(msg) Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` Raises: PublishReturned: If the published message is rejected by the broker. ConnectionException: If a connection error occurs while publishing. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges """ message.validate() try: self._connect_and_publish(exchange, message) except (pika_errs.NackError, pika_errs.UnroutableError) as e: _log.warning("Message was rejected by the broker (%s)", str(e)) raise PublishReturned(reason=e) except (pika_errs.ConnectionClosed, pika_errs.AMQPChannelError): # Because this is a blocking connection (and thus can't heartbeat) # we might need to restart the connection. _log.info("Resetting connection to %s", self._parameters.host) self._connection = self._channel = None try: self._connect_and_publish(exchange, message) except (pika_errs.NackError, pika_errs.UnroutableError) as e: _log.warning("Message was rejected by the broker (%s)", str(e)) raise PublishReturned(reason=e) except pika_errs.AMQPError as e: _log.error(str(e)) if self._connection and self._connection.is_open: self._connection.close() raise ConnectionException(reason=e) except pika_errs.AMQPError as e: if self._connection and self._connection.is_open: self._connection.close() raise ConnectionException(reason=e)
[ "def", "publish", "(", "self", ",", "message", ",", "exchange", "=", "None", ")", ":", "message", ".", "validate", "(", ")", "try", ":", "self", ".", "_connect_and_publish", "(", "exchange", ",", "message", ")", "except", "(", "pika_errs", ".", "NackError", ",", "pika_errs", ".", "UnroutableError", ")", "as", "e", ":", "_log", ".", "warning", "(", "\"Message was rejected by the broker (%s)\"", ",", "str", "(", "e", ")", ")", "raise", "PublishReturned", "(", "reason", "=", "e", ")", "except", "(", "pika_errs", ".", "ConnectionClosed", ",", "pika_errs", ".", "AMQPChannelError", ")", ":", "# Because this is a blocking connection (and thus can't heartbeat)", "# we might need to restart the connection.", "_log", ".", "info", "(", "\"Resetting connection to %s\"", ",", "self", ".", "_parameters", ".", "host", ")", "self", ".", "_connection", "=", "self", ".", "_channel", "=", "None", "try", ":", "self", ".", "_connect_and_publish", "(", "exchange", ",", "message", ")", "except", "(", "pika_errs", ".", "NackError", ",", "pika_errs", ".", "UnroutableError", ")", "as", "e", ":", "_log", ".", "warning", "(", "\"Message was rejected by the broker (%s)\"", ",", "str", "(", "e", ")", ")", "raise", "PublishReturned", "(", "reason", "=", "e", ")", "except", "pika_errs", ".", "AMQPError", "as", "e", ":", "_log", ".", "error", "(", "str", "(", "e", ")", ")", "if", "self", ".", "_connection", "and", "self", ".", "_connection", ".", "is_open", ":", "self", ".", "_connection", ".", "close", "(", ")", "raise", "ConnectionException", "(", "reason", "=", "e", ")", "except", "pika_errs", ".", "AMQPError", "as", "e", ":", "if", "self", ".", "_connection", "and", "self", ".", "_connection", ".", "is_open", ":", "self", ".", "_connection", ".", "close", "(", ")", "raise", "ConnectionException", "(", "reason", "=", "e", ")" ]
Publish a :class:`fedora_messaging.message.Message` to an `exchange`_ on the message broker. >>> from fedora_messaging import _session, message >>> msg = message.Message(topic='test', body={'test':'message'}) >>> sess = session.BlockingSession() >>> sess.publish(msg) Args: message (message.Message): The message to publish. exchange (str): The name of the AMQP exchange to publish to; defaults to :ref:`conf-publish-exchange` Raises: PublishReturned: If the published message is rejected by the broker. ConnectionException: If a connection error occurs while publishing. .. _exchange: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges
[ "Publish", "a", ":", "class", ":", "fedora_messaging", ".", "message", ".", "Message", "to", "an", "exchange", "_", "on", "the", "message", "broker", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L129-L174
train
Publish a message to an AMQP exchange.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWM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ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(53) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b101101 + 0o6) + chr(1392 - 1341) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(698 - 650) + '\157' + chr(0b100000 + 0o23) + chr(0b101 + 0o53) + chr(0b110011), 10089 - 10081), nzTpIcepk0o8('\x30' + chr(11344 - 11233) + '\062' + chr(0b110001 + 0o2) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110000) + chr(51), 34106 - 34098), nzTpIcepk0o8(chr(48) + chr(0b1011011 + 0o24) + '\x33' + chr(586 - 537) + chr(0b11 + 0o64), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(504 - 453) + '\x35' + chr(1396 - 1345), 8), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b11001 + 0o31) + chr(1496 - 1443) + chr(0b101010 + 0o13), 34429 - 34421), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(50) + chr(0b10101 + 0o41) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + chr(49) + '\067' + chr(0b10101 + 0o40), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + chr(372 - 320) + chr(2295 - 2245), 0o10), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(0b110100) + chr(1390 - 1340), 8), nzTpIcepk0o8(chr(1219 - 1171) + chr(111) + chr(49) + chr(0b1111 + 0o41) + chr(0b11110 + 0o30), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + '\x35' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\x31' + chr(49) + chr(184 - 132), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + '\063' + '\063' + chr(512 - 461), 0o10), nzTpIcepk0o8(chr(729 - 681) + '\157' + chr(208 - 159) + '\065' + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(909 - 860) + chr(1489 - 1440), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8734 - 8623) + chr(0b110010) + chr(0b110 + 0o53) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + '\x32' + chr(52) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(10855 - 10744) + chr(0b110011) + '\x32' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5093 - 4982) + '\x35' + chr(817 - 766), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(1538 - 1427) + chr(49) + '\x31' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\x33' + '\064', 36345 - 36337), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + '\061' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + '\063' + '\067' + '\x35', 5364 - 5356), nzTpIcepk0o8(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b110001) + chr(1692 - 1643) + chr(1115 - 1061), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1111 + 0o140) + chr(0b110011) + chr(0b101111 + 0o2) + '\061', 41485 - 41477), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(54) + '\062', 16125 - 16117), nzTpIcepk0o8('\x30' + chr(111) + chr(2267 - 2218) + '\064' + chr(0b100100 + 0o14), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b110010 + 0o0) + chr(50) + '\066', 0b1000), nzTpIcepk0o8(chr(2197 - 2149) + chr(4060 - 3949) + chr(0b110001) + chr(52) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(54) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1038 - 990) + '\x6f' + '\067' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b100010 + 0o23) + chr(49), 0o10), nzTpIcepk0o8(chr(823 - 775) + '\157' + '\x31' + '\061' + chr(50), 11665 - 11657), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b111 + 0o60) + chr(0b110000 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + '\x32' + '\066' + chr(48), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(564 - 511) + chr(1946 - 1898), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc5'), '\144' + '\x65' + chr(0b1100010 + 0o1) + chr(0b1001111 + 0o40) + chr(100) + chr(101))(chr(0b1110001 + 0o4) + chr(0b1110100) + '\x66' + chr(0b10100 + 0o31) + chr(0b101000 + 0o20)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZRkmNLRvN8fl(hXMPsSrOQzbh, FksNMH1w_ns6, bxTA8Iugm8rP=None): roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'\xac\xec\xf3\xfb \x9c\x88\xce\xf4;w`'), chr(0b1100100) + chr(0b110000 + 0o65) + '\x63' + chr(0b1101111) + chr(100) + chr(101))(chr(0b10111 + 0o136) + chr(0b100010 + 0o122) + chr(0b1100110) + '\x2d' + chr(2859 - 2803)))() try: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb4\xbb\xac\xf1-\xaa\x88\xd9\xea\x1cxF}6_.\xb7\x07\xfa\xe3'), chr(100) + '\145' + '\143' + chr(111) + chr(3409 - 3309) + '\x65')(chr(117) + chr(116) + chr(0b1100110) + '\055' + chr(1354 - 1298)))(bxTA8Iugm8rP, FksNMH1w_ns6) except (roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xa5\xb9\xa0\xf4\x06\xbd\x99\xc2\xc7'), '\144' + chr(0b1101 + 0o130) + chr(0b101100 + 0o67) + chr(0b110001 + 0o76) + chr(100) + '\145')(chr(0b1010011 + 0o42) + chr(0b1110011 + 0o1) + chr(9489 - 9387) + chr(972 - 927) + '\x38')), roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xbe\xb6\xb1\xf06\xbb\x8a\xcf\xd9\x18SPP)X'), '\x64' + chr(101) + '\143' + chr(111) + chr(100) + '\145')(chr(117) + '\164' + chr(102) + chr(45) + '\x38'))) as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x9c\xb9\xb1\xf1*\xa1\x8c'), chr(0b101001 + 0o73) + '\145' + '\x63' + '\157' + '\144' + chr(0b1001010 + 0o33))(chr(0b110000 + 0o105) + chr(116) + chr(102) + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xa6\xbd\xb0\xec"\xa8\x8e\x8d\xc2\x1ce\x02P#@)\xb8\x1a\xec\xef\x83\xb5m\x0b:\xb4m\xdd,\xbb]\x0b\xf3\x16V\x12L9\x90'), chr(0b1100100) + chr(0b1100010 + 0o3) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(101))(chr(0b10100 + 0o141) + chr(1865 - 1749) + '\x66' + chr(0b101101) + chr(56)), N9zlRy29S1SS(wgf0sgcu_xPL)) raise p6YPSwnJiGvX(reason=wgf0sgcu_xPL) except (roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xa8\xb7\xad\xf1&\xac\x9f\xc4\xda\x13UNM5O('), chr(100) + chr(3433 - 3332) + chr(99) + chr(0b1001001 + 0o46) + chr(0b1011001 + 0o13) + chr(4496 - 4395))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b10110 + 0o27) + '\070')), roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xaa\x95\x92\xcf\x00\xa7\x8a\xc3\xdb\x18zgP4E>'), '\144' + '\x65' + '\143' + chr(0b1101111) + chr(1259 - 1159) + '\145')(chr(8104 - 7987) + chr(2653 - 2537) + chr(0b11111 + 0o107) + chr(0b101101) + chr(2907 - 2851)))): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x82\xa0\x8d\xe7z\x83\x9c\xf2\x84\x1adm'), '\x64' + '\145' + '\x63' + chr(0b1101111) + '\144' + '\145')('\165' + chr(0b1110100) + chr(1999 - 1897) + '\055' + chr(2706 - 2650)))(roI3spqORKae(ES5oEprVxulp(b'\xb9\xbd\xb0\xfa7\xbb\x82\xc3\xd2]uML(O/\xaf\x07\xe6\xe5\x83\xa3{\x0bk\xaf'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b100110 + 0o77))(chr(0b1001100 + 0o51) + chr(1969 - 1853) + '\x66' + chr(45) + chr(0b111000)), roI3spqORKae(hXMPsSrOQzbh._parameters, roI3spqORKae(ES5oEprVxulp(b'\xbe\xbb\x99\xf0%\x82\x8a\xc9\xfcH~f'), '\144' + '\x65' + chr(0b1100011) + chr(3905 - 3794) + '\144' + '\145')(chr(0b111110 + 0o67) + chr(0b1110100) + chr(3675 - 3573) + chr(0b101101) + chr(0b111000)))) hXMPsSrOQzbh.JxEa_71V8iAg = hXMPsSrOQzbh.oO1rBQeetvBW = None try: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb4\xbb\xac\xf1-\xaa\x88\xd9\xea\x1cxF}6_.\xb7\x07\xfa\xe3'), chr(2064 - 1964) + '\145' + chr(6215 - 6116) + chr(111) + '\144' + chr(101))(chr(117) + chr(116) + chr(102) + chr(1563 - 1518) + '\x38'))(bxTA8Iugm8rP, FksNMH1w_ns6) except (roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xa5\xb9\xa0\xf4\x06\xbd\x99\xc2\xc7'), '\144' + chr(0b1000010 + 0o43) + chr(5703 - 5604) + '\x6f' + '\x64' + chr(0b10000 + 0o125))(chr(9815 - 9698) + '\164' + '\x66' + chr(45) + chr(175 - 119))), roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xbe\xb6\xb1\xf06\xbb\x8a\xcf\xd9\x18SPP)X'), chr(6867 - 6767) + '\x65' + chr(99) + chr(0b1101111) + chr(2454 - 2354) + chr(0b111110 + 0o47))(chr(0b1110101) + chr(0b1000011 + 0o61) + chr(0b1011100 + 0o12) + chr(0b101000 + 0o5) + '\070'))) as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x9c\xb9\xb1\xf1*\xa1\x8c'), chr(100) + '\145' + '\143' + chr(0b110011 + 0o74) + '\x64' + chr(0b1100101))(chr(117) + '\164' + '\146' + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xa6\xbd\xb0\xec"\xa8\x8e\x8d\xc2\x1ce\x02P#@)\xb8\x1a\xec\xef\x83\xb5m\x0b:\xb4m\xdd,\xbb]\x0b\xf3\x16V\x12L9\x90'), chr(100) + '\145' + chr(0b100 + 0o137) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(12860 - 12743) + chr(116) + '\x66' + chr(45) + chr(56)), N9zlRy29S1SS(wgf0sgcu_xPL)) raise p6YPSwnJiGvX(reason=wgf0sgcu_xPL) except roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xaa\x95\x92\xcf\x06\xbd\x99\xc2\xc7'), chr(0b1000000 + 0o44) + '\145' + chr(99) + chr(0b1101111) + '\144' + chr(0b1010111 + 0o16))(chr(0b1110101) + chr(10590 - 10474) + '\x66' + chr(0b101101) + chr(0b101011 + 0o15))) as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\x9a\xb1\xf2\xe8*\xbf\xbb\xfb\xc38]F'), '\x64' + '\145' + chr(1900 - 1801) + '\x6f' + chr(0b1100100) + chr(0b11100 + 0o111))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b10010 + 0o33) + chr(0b111000)))(N9zlRy29S1SS(wgf0sgcu_xPL)) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa1\xa0\x86\xfe\x1c\xf8\xda\xfb\x8d\x14WE'), '\144' + '\x65' + chr(0b101001 + 0o72) + chr(0b1101111) + chr(0b1100100) + chr(3184 - 3083))('\x75' + chr(0b111001 + 0o73) + chr(0b10110 + 0o120) + chr(45) + chr(56))) and roI3spqORKae(hXMPsSrOQzbh._connection, roI3spqORKae(ES5oEprVxulp(b'\xae\xb6\x8c\xf5:\xad\xda\xcf\xdf8$v'), '\144' + chr(8102 - 8001) + chr(99) + chr(0b111111 + 0o60) + '\x64' + chr(101))(chr(0b1010110 + 0o37) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000))): roI3spqORKae(hXMPsSrOQzbh._connection, roI3spqORKae(ES5oEprVxulp(b'\xb1\xbd\xb2\xa8\x00\xac\x8d\x94\xe0\x19.H'), chr(100) + chr(0b1010010 + 0o23) + '\x63' + '\x6f' + '\x64' + '\x65')(chr(0b1110010 + 0o3) + chr(116) + chr(0b1100110) + chr(0b101101) + '\070'))() raise L6C259nNuLMI(reason=wgf0sgcu_xPL) except roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xaa\x95\x92\xcf\x06\xbd\x99\xc2\xc7'), chr(0b1100001 + 0o3) + chr(1219 - 1118) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b111001 + 0o54))('\165' + chr(0b1001100 + 0o50) + chr(102) + chr(0b1100 + 0o41) + '\070')) as wgf0sgcu_xPL: if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa1\xa0\x86\xfe\x1c\xf8\xda\xfb\x8d\x14WE'), chr(100) + chr(7796 - 7695) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1001001 + 0o34))(chr(117) + chr(0b1110100) + '\146' + '\x2d' + chr(0b111000))) and roI3spqORKae(hXMPsSrOQzbh._connection, roI3spqORKae(ES5oEprVxulp(b'\xae\xb6\x8c\xf5:\xad\xda\xcf\xdf8$v'), chr(9012 - 8912) + chr(0b1100101) + chr(0b1000110 + 0o35) + '\157' + chr(1079 - 979) + chr(101))('\x75' + chr(13163 - 13047) + '\x66' + '\x2d' + chr(0b100010 + 0o26))): roI3spqORKae(hXMPsSrOQzbh._connection, roI3spqORKae(ES5oEprVxulp(b'\xb1\xbd\xb2\xa8\x00\xac\x8d\x94\xe0\x19.H'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b1000 + 0o147) + chr(0b0 + 0o144) + '\145')('\165' + chr(0b1110100) + chr(0b1001111 + 0o27) + chr(45) + '\x38'))() raise L6C259nNuLMI(reason=wgf0sgcu_xPL)
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._shutdown
def _shutdown(self): """Gracefully shut down the consumer and exit.""" if self._channel: _log.info("Halting %r consumer sessions", self._channel.consumer_tags) self._running = False if self._connection and self._connection.is_open: self._connection.close() # Reset the signal handler for signum in (signal.SIGTERM, signal.SIGINT): signal.signal(signum, signal.SIG_DFL)
python
def _shutdown(self): """Gracefully shut down the consumer and exit.""" if self._channel: _log.info("Halting %r consumer sessions", self._channel.consumer_tags) self._running = False if self._connection and self._connection.is_open: self._connection.close() # Reset the signal handler for signum in (signal.SIGTERM, signal.SIGINT): signal.signal(signum, signal.SIG_DFL)
[ "def", "_shutdown", "(", "self", ")", ":", "if", "self", ".", "_channel", ":", "_log", ".", "info", "(", "\"Halting %r consumer sessions\"", ",", "self", ".", "_channel", ".", "consumer_tags", ")", "self", ".", "_running", "=", "False", "if", "self", ".", "_connection", "and", "self", ".", "_connection", ".", "is_open", ":", "self", ".", "_connection", ".", "close", "(", ")", "# Reset the signal handler", "for", "signum", "in", "(", "signal", ".", "SIGTERM", ",", "signal", ".", "SIGINT", ")", ":", "signal", ".", "signal", "(", "signum", ",", "signal", ".", "SIG_DFL", ")" ]
Gracefully shut down the consumer and exit.
[ "Gracefully", "shut", "down", "the", "consumer", "and", "exit", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L224-L233
train
Gracefully shut down the consumer and exit.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,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XdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + chr(0b101110 + 0o5) + '\063' + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + chr(49) + '\062' + chr(50), 54491 - 54483), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10101 + 0o36) + '\x35' + chr(0b100011 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x30' + '\x33', 39308 - 39300), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\x31' + '\x36', 34470 - 34462), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + '\066' + chr(2411 - 2357), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b110010) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x31' + chr(0b11000 + 0o30), 37707 - 37699), nzTpIcepk0o8(chr(0b110000) + chr(1670 - 1559) + chr(52) + '\060', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + chr(0b11000 + 0o32) + '\x35' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(1048 - 999), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b1000 + 0o53) + chr(0b0 + 0o66) + chr(54), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(690 - 640) + chr(49) + '\067', ord("\x08")), nzTpIcepk0o8(chr(1037 - 989) + '\157' + chr(0b11 + 0o56) + chr(740 - 687) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101100 + 0o3) + chr(2387 - 2337) + '\065' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b10100 + 0o34) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + '\063' + '\065' + chr(0b1100 + 0o45), 0b1000), nzTpIcepk0o8(chr(48) + chr(820 - 709) + '\x31' + chr(0b100101 + 0o20) + '\x34', 54681 - 54673), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + '\060' + chr(2256 - 2207), 0o10), nzTpIcepk0o8(chr(2100 - 2052) + chr(0b1011011 + 0o24) + '\062' + chr(0b110011) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + chr(50) + '\063' + chr(358 - 304), 63027 - 63019), nzTpIcepk0o8('\x30' + chr(6058 - 5947) + chr(0b100001 + 0o22) + '\060' + chr(0b110010 + 0o5), 1075 - 1067), nzTpIcepk0o8('\x30' + '\x6f' + chr(1629 - 1578) + chr(0b110010) + chr(0b0 + 0o60), 0o10), nzTpIcepk0o8(chr(212 - 164) + chr(0b1101111) + '\x31' + chr(0b110010) + '\x32', 8), nzTpIcepk0o8(chr(1899 - 1851) + chr(111) + '\061' + chr(0b100011 + 0o17) + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(2603 - 2550) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + '\061' + chr(0b1101 + 0o45) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(11613 - 11502) + chr(0b110000), 15758 - 15750), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b110001 + 0o76) + chr(53) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10000 + 0o42) + chr(0b110100) + chr(2222 - 2173), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4687 - 4576) + chr(703 - 648), ord("\x08")), nzTpIcepk0o8(chr(418 - 370) + chr(0b1101111) + chr(0b110 + 0o53) + chr(0b100101 + 0o21) + chr(48), 60794 - 60786), nzTpIcepk0o8(chr(598 - 550) + chr(0b1100011 + 0o14) + chr(49) + chr(0b110011 + 0o3) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b110011) + '\063', 14101 - 14093), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\061' + '\065' + chr(0b110 + 0o54), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(52) + '\x33', 34896 - 34888), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101 + 0o54) + '\065' + chr(0b110011), 8), nzTpIcepk0o8(chr(1380 - 1332) + chr(1235 - 1124) + '\x32' + chr(0b100111 + 0o14) + chr(0b11001 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010101 + 0o32) + chr(0b110010) + chr(0b110000) + '\x30', 17170 - 17162), nzTpIcepk0o8(chr(1492 - 1444) + chr(0b1100110 + 0o11) + chr(0b110010) + '\x33' + chr(2870 - 2815), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b111001 + 0o66) + chr(53) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf3'), chr(0b1100100) + '\145' + '\x63' + chr(0b1101111) + '\x64' + chr(0b11 + 0o142))(chr(7289 - 7172) + chr(0b111100 + 0o70) + chr(0b1100110) + chr(0b11110 + 0o17) + chr(0b1000 + 0o60)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def pf2bJAJwX0RC(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb2\x1d\xdd1\x0c\xa7\xb7\xadT\xdfK\xa1'), chr(0b1100100) + '\x65' + chr(6245 - 6146) + chr(111) + chr(0b11101 + 0o107) + '\145')('\165' + '\x74' + '\x66' + chr(523 - 478) + '\070')): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xb4*\xa2;w\xba\xa5\x97\x11\xce{\xb9'), chr(100) + '\x65' + '\x63' + chr(111) + chr(0b1111 + 0o125) + chr(0b1011 + 0o132))(chr(13335 - 13218) + chr(9222 - 9106) + '\x66' + '\x2d' + chr(0b100011 + 0o25)))(roI3spqORKae(ES5oEprVxulp(b"\x953\x807'\x98\xb5\xe8\x05\xdb)\x95\xe0\x04\xdd\xb1\x84\t\xb3\xb9\xed\xa2\xa3!;\x049s"), '\144' + chr(7965 - 7864) + '\x63' + '\x6f' + chr(4402 - 4302) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(423 - 321) + '\055' + '\070'), roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'\xbe=\x820;\x9b\xb7\xba\x7f\xddh\x91\xfc'), chr(0b100100 + 0o100) + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + '\145')(chr(13265 - 13148) + '\x74' + chr(6603 - 6501) + chr(0b101101) + chr(0b110000 + 0o10)))) hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(399 - 351) + chr(0b1101111) + chr(0b100000 + 0o20), 8) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x97*\xa9"\x11\xc1\xe3\x9e\x18\xc0H\x91'), '\x64' + chr(0b1100101) + chr(0b1011110 + 0o5) + '\x6f' + chr(3229 - 3129) + chr(0b110110 + 0o57))(chr(587 - 470) + chr(0b100111 + 0o115) + '\146' + '\055' + chr(2915 - 2859))) and roI3spqORKae(hXMPsSrOQzbh._connection, roI3spqORKae(ES5oEprVxulp(b'\x98<\xa3)7\x94\xe3\xaaJ\xec;\xa2'), chr(0b1000011 + 0o41) + chr(5924 - 5823) + chr(0b100101 + 0o76) + chr(0b1000100 + 0o53) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(11627 - 11511) + chr(102) + chr(0b100100 + 0o11) + chr(1618 - 1562))): roI3spqORKae(hXMPsSrOQzbh._connection, roI3spqORKae(ES5oEprVxulp(b'\x877\x9dt\r\x95\xb4\xf1u\xcd1\x9c'), chr(951 - 851) + chr(0b1011 + 0o132) + chr(5355 - 5256) + chr(111) + chr(0b1100100) + chr(0b1010001 + 0o24))(chr(4308 - 4191) + chr(116) + '\x66' + '\x2d' + chr(0b111000)))() for ULcZXRASQG3j in (roI3spqORKae(bNAqtpGn_xJK, roI3spqORKae(ES5oEprVxulp(b'\x8e\x1b\xab\x17\x0b\xa4\x9f'), '\144' + '\145' + '\143' + chr(12295 - 12184) + '\x64' + chr(478 - 377))(chr(4452 - 4335) + '\164' + chr(0b1100110) + chr(1657 - 1612) + chr(0b1011 + 0o55))), roI3spqORKae(bNAqtpGn_xJK, roI3spqORKae(ES5oEprVxulp(b'\x8e\x1b\xab\n\x00\xa2'), '\144' + chr(101) + chr(0b0 + 0o143) + chr(111) + chr(0b11101 + 0o107) + chr(3228 - 3127))('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38'))): roI3spqORKae(bNAqtpGn_xJK, roI3spqORKae(ES5oEprVxulp(b'\xae;\x8b-/\x9a'), '\144' + '\x65' + '\143' + chr(0b1101111) + '\x64' + chr(734 - 633))('\x75' + chr(0b10011 + 0o141) + chr(0b1100110) + '\055' + chr(0b111000)))(ULcZXRASQG3j, roI3spqORKae(bNAqtpGn_xJK, roI3spqORKae(ES5oEprVxulp(b'\x8e\x1b\xab\x1c\n\xb0\x9e'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\x64' + chr(473 - 372))(chr(0b1110101) + '\164' + chr(102) + chr(0b11 + 0o52) + chr(0b101000 + 0o20))))
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_cancelok
def _on_cancelok(self, cancel_frame): """ Called when the server acknowledges a cancel request. Args: cancel_frame (pika.spec.Basic.CancelOk): The cancelok frame from the server. """ _log.info("Consumer canceled; returning all unprocessed messages to the queue") self._channel.basic_nack(delivery_tag=0, multiple=True, requeue=True)
python
def _on_cancelok(self, cancel_frame): """ Called when the server acknowledges a cancel request. Args: cancel_frame (pika.spec.Basic.CancelOk): The cancelok frame from the server. """ _log.info("Consumer canceled; returning all unprocessed messages to the queue") self._channel.basic_nack(delivery_tag=0, multiple=True, requeue=True)
[ "def", "_on_cancelok", "(", "self", ",", "cancel_frame", ")", ":", "_log", ".", "info", "(", "\"Consumer canceled; returning all unprocessed messages to the queue\"", ")", "self", ".", "_channel", ".", "basic_nack", "(", "delivery_tag", "=", "0", ",", "multiple", "=", "True", ",", "requeue", "=", "True", ")" ]
Called when the server acknowledges a cancel request. Args: cancel_frame (pika.spec.Basic.CancelOk): The cancelok frame from the server.
[ "Called", "when", "the", "server", "acknowledges", "a", "cancel", "request", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L235-L244
train
Called when the server acknowledges a cancel request.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,G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gW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b110011) + '\063' + chr(0b100001 + 0o17), 25048 - 25040), nzTpIcepk0o8(chr(233 - 185) + '\157' + '\x33' + chr(0b101001 + 0o15), 61669 - 61661), nzTpIcepk0o8(chr(267 - 219) + '\157' + '\062' + chr(0b11010 + 0o32) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(8934 - 8823) + chr(0b101000 + 0o12) + chr(0b110010) + chr(2084 - 2029), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(120 - 68) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(750 - 700) + '\065' + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(2047 - 1996) + chr(660 - 610) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(0b11111 + 0o23) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011 + 0o144) + chr(835 - 786) + chr(2831 - 2776) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(0b1100 + 0o143) + chr(1290 - 1240) + '\x33', 23336 - 23328), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(0b110010) + chr(49) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + '\x33' + '\060' + '\061', 64266 - 64258), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + '\061' + chr(1102 - 1054) + chr(55), 37450 - 37442), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(52) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + chr(8213 - 8102) + '\067' + chr(589 - 534), 37697 - 37689), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b110001) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\060' + '\x33', 62991 - 62983), nzTpIcepk0o8(chr(403 - 355) + chr(111) + chr(0b110011) + chr(684 - 632), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110101) + '\066', 0o10), nzTpIcepk0o8(chr(683 - 635) + '\157' + '\x31', 19890 - 19882), nzTpIcepk0o8(chr(0b110000) + chr(11475 - 11364) + chr(0b110 + 0o53) + '\063' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\064' + chr(0b110001), 42159 - 42151), nzTpIcepk0o8(chr(1038 - 990) + '\x6f' + '\067' + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + '\x30' + '\062', 16399 - 16391), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(1730 - 1679) + '\x32' + chr(54), 62503 - 62495), nzTpIcepk0o8('\x30' + chr(0b1011111 + 0o20) + '\x33' + '\x34', 8), nzTpIcepk0o8('\x30' + chr(0b11011 + 0o124) + chr(49) + chr(0b100001 + 0o17) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110000) + '\067', 8), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(2078 - 1967) + chr(51) + chr(783 - 735) + '\062', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x33' + chr(638 - 586), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1077 - 1023) + '\064', 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(8653 - 8542) + chr(1634 - 1583) + '\x32' + chr(312 - 260), 60005 - 59997), nzTpIcepk0o8(chr(1475 - 1427) + chr(1101 - 990) + chr(146 - 92) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(48), 12495 - 12487), nzTpIcepk0o8(chr(48) + '\157' + chr(698 - 647) + '\064' + '\x31', 0o10), nzTpIcepk0o8(chr(1585 - 1537) + chr(111) + chr(2051 - 2000) + chr(432 - 380) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + '\063' + chr(0b1110 + 0o46) + chr(2489 - 2437), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b1111 + 0o50), 0o10), nzTpIcepk0o8(chr(477 - 429) + '\x6f' + '\062' + chr(0b10111 + 0o31) + chr(0b110101), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(1950 - 1839) + chr(53) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf6'), chr(0b1011100 + 0o10) + chr(0b1000000 + 0o45) + chr(0b1100011) + chr(0b111010 + 0o65) + chr(4455 - 4355) + '\145')('\x75' + chr(0b11011 + 0o131) + chr(102) + chr(45) + chr(352 - 296)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fJwXE6sM77Xv(hXMPsSrOQzbh, xjtSD7OBMG8_): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xb1f\xed\xef\x1e\xe7\xa7JMia\xc5'), chr(2698 - 2598) + chr(0b1100101) + chr(6282 - 6183) + chr(0b101011 + 0o104) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(13361 - 13245) + chr(7869 - 7767) + '\055' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x9bq\xcd\xe4R\xc6\xb5g\\mr\xe4\xa2"\xccZ\xef\xf8<\xdcd/\x14N,\xbfr&g\xa3\xb0X\xf4Ev\x91\x97\x8bl\xe0\xabm\xc6\xf3\x07\xc6\xb5f\x0fot\xef\xb2g\xd4P\xab\xb7t\xcb!*\x14Y7\xb3'), chr(0b1001110 + 0o26) + chr(101) + chr(0b10101 + 0o116) + '\x6f' + chr(100) + '\145')(chr(4038 - 3921) + chr(0b1110100) + '\x66' + '\055' + '\070')) roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'\xba\x7f\xd0\xfeD\xf4\xbet\x1fe'), '\144' + chr(5551 - 5450) + '\x63' + '\x6f' + '\x64' + '\x65')(chr(0b1110101) + chr(8800 - 8684) + chr(0b111110 + 0o50) + '\055' + '\x38'))(delivery_tag=nzTpIcepk0o8(chr(0b111 + 0o51) + chr(3852 - 3741) + '\x30', 0b1000), multiple=nzTpIcepk0o8(chr(48) + '\157' + '\x31', 8), requeue=nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110 + 0o53), 8))
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_channel_open
def _on_channel_open(self, channel): """ Callback used when a channel is opened. This registers all the channel callbacks. Args: channel (pika.channel.Channel): The channel that successfully opened. """ channel.add_on_close_callback(self._on_channel_close) channel.add_on_cancel_callback(self._on_cancel) channel.basic_qos(callback=self._on_qosok, **config.conf["qos"])
python
def _on_channel_open(self, channel): """ Callback used when a channel is opened. This registers all the channel callbacks. Args: channel (pika.channel.Channel): The channel that successfully opened. """ channel.add_on_close_callback(self._on_channel_close) channel.add_on_cancel_callback(self._on_cancel) channel.basic_qos(callback=self._on_qosok, **config.conf["qos"])
[ "def", "_on_channel_open", "(", "self", ",", "channel", ")", ":", "channel", ".", "add_on_close_callback", "(", "self", ".", "_on_channel_close", ")", "channel", ".", "add_on_cancel_callback", "(", "self", ".", "_on_cancel", ")", "channel", ".", "basic_qos", "(", "callback", "=", "self", ".", "_on_qosok", ",", "*", "*", "config", ".", "conf", "[", "\"qos\"", "]", ")" ]
Callback used when a channel is opened. This registers all the channel callbacks. Args: channel (pika.channel.Channel): The channel that successfully opened.
[ "Callback", "used", "when", "a", "channel", "is", "opened", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-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8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\x30' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(52) + chr(0b101101 + 0o3), 15592 - 15584), nzTpIcepk0o8(chr(2168 - 2120) + '\x6f' + chr(0b110011) + chr(52) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(4097 - 3986) + chr(0b110110) + chr(0b110100), 183 - 175), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(897 - 843) + chr(0b10111 + 0o40), 0b1000), nzTpIcepk0o8(chr(53 - 5) + chr(0b1101111) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b11011 + 0o27) + chr(0b100011 + 0o17) + chr(0b110000), 28896 - 28888), nzTpIcepk0o8(chr(928 - 880) + chr(0b1101111) + chr(49) + chr(51) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(1035 - 983) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001 + 0o146) + chr(0b1 + 0o62) + chr(1150 - 1099), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(753 - 704) + chr(590 - 535), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + chr(814 - 759) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10 + 0o57) + chr(737 - 689) + chr(0b110001), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\067' + chr(0b110010), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(414 - 366) + chr(0b11100 + 0o30), 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + chr(49) + chr(0b110011) + '\x33', 0o10), nzTpIcepk0o8(chr(1423 - 1375) + '\157' + chr(0b10111 + 0o33) + '\066' + '\x32', 53727 - 53719), nzTpIcepk0o8('\060' + chr(0b1101100 + 0o3) + '\062' + chr(1690 - 1636), 0b1000), nzTpIcepk0o8(chr(735 - 687) + chr(0b1101111) + '\x33' + chr(299 - 249) + chr(0b110011), 59299 - 59291), nzTpIcepk0o8(chr(1769 - 1721) + chr(111) + chr(51) + chr(0b100000 + 0o21) + chr(51), 59852 - 59844), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11100 + 0o27) + chr(48) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + chr(0b10010 + 0o37) + chr(0b110001) + chr(2472 - 2420), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2445 - 2394) + chr(0b110011) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + chr(1241 - 1192) + chr(0b10111 + 0o33) + chr(376 - 326), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + '\x31' + chr(52) + chr(759 - 708), 0b1000), nzTpIcepk0o8(chr(48) + chr(1715 - 1604) + chr(0b100110 + 0o15) + chr(0b110111) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(2200 - 2149) + '\x34' + '\064', 0o10), nzTpIcepk0o8(chr(1321 - 1273) + chr(0b1101111) + '\062' + chr(0b110010) + chr(53), 812 - 804), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b101100 + 0o6) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\x31' + '\062' + chr(50), 8), nzTpIcepk0o8('\060' + chr(0b1000000 + 0o57) + chr(0b110010) + '\066' + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x37' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + '\063' + chr(1536 - 1484) + chr(471 - 418), 8), nzTpIcepk0o8(chr(0b110000) + chr(9796 - 9685) + '\x33' + chr(1969 - 1921), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\x32' + chr(48), 8), nzTpIcepk0o8(chr(2048 - 2000) + chr(1540 - 1429) + chr(50) + '\063' + chr(1814 - 1766), 64463 - 64455), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\x37' + '\062', 0o10), nzTpIcepk0o8(chr(1913 - 1865) + chr(0b101111 + 0o100) + chr(2174 - 2124) + chr(0b0 + 0o67) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + chr(50) + chr(51), 8328 - 8320)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b100010 + 0o115) + chr(53) + chr(0b10001 + 0o37), 26416 - 26408)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'o'), chr(100) + chr(0b1001000 + 0o35) + chr(99) + chr(0b1101111) + '\144' + chr(8849 - 8748))('\165' + chr(116) + chr(102) + chr(0b100111 + 0o6) + chr(0b100100 + 0o24)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def omde3JCObPHp(hXMPsSrOQzbh, qiE6ZboUDe50): roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b' \x84\x81k\xd8i\xcf>\x8bt<_\x1eY\xa57\xdet\xb2\xa8\xac'), '\x64' + chr(0b1100101) + chr(1831 - 1732) + chr(0b1101111) + chr(100) + chr(101))('\x75' + '\x74' + chr(5189 - 5087) + '\x2d' + chr(1202 - 1146)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1e\x8f\x8bk\xd4o\xf13\x89~#e"V\xab(\xd7'), '\x64' + '\x65' + chr(1510 - 1411) + '\157' + chr(5242 - 5142) + chr(0b1100101))(chr(5475 - 5358) + '\x74' + chr(7263 - 7161) + chr(45) + chr(0b111000)))) roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b" \x84\x81k\xd8i\xcf>\x86u,_-e\xa7:\xdez\xb1\xaa\xa4'"), '\144' + chr(101) + '\143' + chr(0b1101111) + chr(100) + '\145')(chr(0b1000101 + 0o60) + '\164' + '\146' + chr(45) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1e\x8f\x8bk\xd4f\xfe>\x82w'), chr(4243 - 4143) + '\x65' + chr(4950 - 4851) + chr(0b111 + 0o150) + '\144' + chr(0b1000110 + 0o37))('\165' + '\164' + chr(0b100101 + 0o101) + '\x2d' + '\070'))) roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'#\x81\x96]\xd4X\xe12\x94'), '\144' + chr(1535 - 1434) + chr(0b1100011) + chr(111) + chr(9916 - 9816) + '\145')(chr(12728 - 12611) + chr(3550 - 3434) + chr(4396 - 4294) + chr(1229 - 1184) + '\x38'))(callback=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1e\x8f\x8bk\xc6h\xe32\x8c'), chr(100) + chr(0b1010101 + 0o20) + chr(0b1011000 + 0o13) + chr(0b1101111) + chr(0b1100100 + 0o0) + chr(0b100000 + 0o105))(chr(0b110011 + 0o102) + chr(0b111111 + 0o65) + '\146' + chr(0b101101) + '\070')), **roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b" \xa5\xb6g\x81@\xe7%\x88A'{"), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(5320 - 5209) + chr(0b1100100) + chr(101))(chr(6162 - 6045) + chr(116) + chr(6833 - 6731) + chr(0b11011 + 0o22) + chr(731 - 675)))[roI3spqORKae(ES5oEprVxulp(b'0\x8f\x96'), chr(3486 - 3386) + chr(0b1100101) + '\143' + '\x6f' + chr(100) + '\x65')(chr(117) + chr(1277 - 1161) + chr(102) + chr(0b101101) + chr(56))])
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_qosok
def _on_qosok(self, qosok_frame): """ Callback invoked when the server acknowledges the QoS settings. Asserts or creates the exchanges and queues exist. Args: qosok_frame (pika.spec.Basic.Qos): The frame send from the server. """ for name, args in self._exchanges.items(): self._channel.exchange_declare( exchange=name, exchange_type=args["type"], durable=args["durable"], auto_delete=args["auto_delete"], arguments=args["arguments"], passive=config.conf["passive_declares"], callback=self._on_exchange_declareok, ) for name, args in self._queues.items(): self._channel.queue_declare( queue=name, durable=args["durable"], auto_delete=args["auto_delete"], exclusive=args["exclusive"], arguments=args["arguments"], passive=config.conf["passive_declares"], callback=self._on_queue_declareok, )
python
def _on_qosok(self, qosok_frame): """ Callback invoked when the server acknowledges the QoS settings. Asserts or creates the exchanges and queues exist. Args: qosok_frame (pika.spec.Basic.Qos): The frame send from the server. """ for name, args in self._exchanges.items(): self._channel.exchange_declare( exchange=name, exchange_type=args["type"], durable=args["durable"], auto_delete=args["auto_delete"], arguments=args["arguments"], passive=config.conf["passive_declares"], callback=self._on_exchange_declareok, ) for name, args in self._queues.items(): self._channel.queue_declare( queue=name, durable=args["durable"], auto_delete=args["auto_delete"], exclusive=args["exclusive"], arguments=args["arguments"], passive=config.conf["passive_declares"], callback=self._on_queue_declareok, )
[ "def", "_on_qosok", "(", "self", ",", "qosok_frame", ")", ":", "for", "name", ",", "args", "in", "self", ".", "_exchanges", ".", "items", "(", ")", ":", "self", ".", "_channel", ".", "exchange_declare", "(", "exchange", "=", "name", ",", "exchange_type", "=", "args", "[", "\"type\"", "]", ",", "durable", "=", "args", "[", "\"durable\"", "]", ",", "auto_delete", "=", "args", "[", "\"auto_delete\"", "]", ",", "arguments", "=", "args", "[", "\"arguments\"", "]", ",", "passive", "=", "config", ".", "conf", "[", "\"passive_declares\"", "]", ",", "callback", "=", "self", ".", "_on_exchange_declareok", ",", ")", "for", "name", ",", "args", "in", "self", ".", "_queues", ".", "items", "(", ")", ":", "self", ".", "_channel", ".", "queue_declare", "(", "queue", "=", "name", ",", "durable", "=", "args", "[", "\"durable\"", "]", ",", "auto_delete", "=", "args", "[", "\"auto_delete\"", "]", ",", "exclusive", "=", "args", "[", "\"exclusive\"", "]", ",", "arguments", "=", "args", "[", "\"arguments\"", "]", ",", "passive", "=", "config", ".", "conf", "[", "\"passive_declares\"", "]", ",", "callback", "=", "self", ".", "_on_queue_declareok", ",", ")" ]
Callback invoked when the server acknowledges the QoS settings. Asserts or creates the exchanges and queues exist. Args: qosok_frame (pika.spec.Basic.Qos): The frame send from the server.
[ "Callback", "invoked", "when", "the", "server", "acknowledges", "the", "QoS", "settings", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L260-L288
train
Called when the server acknowledges the QoS settings.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedr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0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(6507 - 6396) + '\x31' + chr(49) + chr(2247 - 2196), 0b1000), nzTpIcepk0o8(chr(1203 - 1155) + chr(111) + chr(1664 - 1613) + '\063' + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x35' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + '\x31' + chr(0b100011 + 0o22), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110010) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\064' + chr(0b110001), 44677 - 44669), nzTpIcepk0o8('\060' + '\157' + chr(55) + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + chr(50) + chr(0b110110) + chr(0b1100 + 0o44), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\062' + chr(450 - 399), 557 - 549), nzTpIcepk0o8(chr(69 - 21) + '\157' + chr(0b10010 + 0o41) + chr(50 - 1) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\064' + '\x36', 24271 - 24263), nzTpIcepk0o8(chr(1207 - 1159) + chr(3105 - 2994) + '\x33' + chr(0b11000 + 0o30) + '\x37', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11010 + 0o31) + '\063' + '\061', 60307 - 60299), nzTpIcepk0o8(chr(1128 - 1080) + '\157' + '\x36' + chr(50), 29549 - 29541), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(0b101101 + 0o11), 58359 - 58351), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2189 - 2139) + '\061' + chr(0b110101), 8), nzTpIcepk0o8(chr(589 - 541) + chr(7269 - 7158) + '\x31' + '\x37' + '\061', 45358 - 45350), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110011) + '\064', 0o10), nzTpIcepk0o8(chr(168 - 120) + '\x6f' + chr(1190 - 1141) + chr(2971 - 2916) + '\064', 0b1000), nzTpIcepk0o8(chr(2025 - 1977) + chr(0b100100 + 0o113) + chr(0b110011) + chr(0b110101) + chr(0b1101 + 0o52), 28542 - 28534), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\066' + chr(512 - 459), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2344 - 2295) + chr(0b100010 + 0o25) + chr(0b11100 + 0o32), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2264 - 2210) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + chr(1148 - 1099) + chr(0b110001) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\063' + chr(0b100010 + 0o24), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(54) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x34' + '\067', 40029 - 40021), nzTpIcepk0o8(chr(48) + chr(9249 - 9138) + '\063' + chr(0b10101 + 0o40) + chr(1050 - 1001), 0b1000), nzTpIcepk0o8(chr(1562 - 1514) + chr(1581 - 1470) + chr(51) + chr(0b100010 + 0o23) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(0b110010) + chr(55) + '\x35', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(52) + chr(51), 484 - 476), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b1101 + 0o45) + '\x30' + '\060', 39172 - 39164), nzTpIcepk0o8(chr(1994 - 1946) + '\157' + '\063' + chr(2036 - 1988) + chr(50), 36900 - 36892), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(176 - 126) + chr(0b1001 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + chr(50) + chr(2002 - 1953) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1000 + 0o53) + chr(0b10011 + 0o44) + chr(0b10110 + 0o37), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + '\x31' + chr(0b101101 + 0o6) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + '\x35' + '\x34', 17251 - 17243), nzTpIcepk0o8(chr(300 - 252) + chr(111) + '\x33' + chr(1605 - 1557) + chr(0b110111), 8), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(0b110111) + chr(49), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111 + 0o0) + '\x35' + chr(0b11101 + 0o23), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'e'), chr(0b1100100) + chr(0b1100101) + chr(0b1111 + 0o124) + chr(111) + '\x64' + chr(101))(chr(117) + chr(0b11010 + 0o132) + chr(0b11100 + 0o112) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def YoOt7kzXBKQT(hXMPsSrOQzbh, CR2KjIR89B3O): for (SLVB2BPA_mIe, eemPYp2vtTSr) in roI3spqORKae(hXMPsSrOQzbh._exchanges, roI3spqORKae(ES5oEprVxulp(b'\x12\x80F\xc3\x15\x1bw\x84\xe0\xbb~\xae'), chr(100) + chr(101) + chr(2981 - 2882) + '\x6f' + chr(100) + chr(3816 - 3715))(chr(0b1110101) + '\x74' + chr(102) + chr(101 - 56) + '\070'))(): roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'.\xa7K\xe51\x0fX\xd5\x8c\xa9C\xa4\xb5St\xe8'), chr(1894 - 1794) + '\x65' + '\143' + '\157' + '\x64' + '\x65')(chr(0b1000110 + 0o57) + '\x74' + '\146' + chr(0b11111 + 0o16) + '\x38'))(exchange=SLVB2BPA_mIe, exchange_type=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'?\xa6X\xe8'), '\x64' + chr(0b10101 + 0o120) + chr(0b10011 + 0o120) + chr(0b1101111) + '\144' + '\x65')('\165' + '\164' + chr(6364 - 6262) + '\055' + chr(0b100010 + 0o26))], durable=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'/\xaaZ\xec2\rZ'), '\144' + '\145' + chr(0b111010 + 0o51) + chr(0b1101111) + chr(0b11100 + 0o110) + '\145')('\x75' + chr(0b1000001 + 0o63) + chr(0b1100110) + '\055' + '\x38')], auto_delete=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'*\xaa\\\xe2\x0f\x05Z\xdc\xb6\xb9C'), chr(4921 - 4821) + '\x65' + chr(4639 - 4540) + chr(4303 - 4192) + chr(0b1100100) + '\145')(chr(0b1011011 + 0o32) + chr(9447 - 9331) + chr(0b111110 + 0o50) + chr(0b101101) + '\x38')], arguments=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'*\xadO\xf8=\x04Q\xc4\xa0'), '\x64' + chr(101) + chr(99) + '\157' + '\x64' + chr(0b1100101))('\165' + '\x74' + chr(0b11101 + 0o111) + chr(0b101101) + '\x38')], passive=roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'*\x9a{\xdef&H\xc8\xbc\x97N\x86'), chr(0b11 + 0o141) + chr(8844 - 8743) + chr(7376 - 7277) + chr(0b1101111 + 0o0) + chr(0b1100100) + chr(0b1100101))('\165' + '\x74' + '\146' + '\055' + chr(1849 - 1793)))[roI3spqORKae(ES5oEprVxulp(b';\xbe[\xfe9\x17Z\xef\xb7\xa8E\xab\xb8@c\xfe'), chr(9725 - 9625) + chr(0b101001 + 0o74) + '\x63' + chr(0b1101111) + chr(3540 - 3440) + chr(101))(chr(117) + chr(3903 - 3787) + chr(0b1100110) + chr(45) + chr(0b1110 + 0o52))], callback=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x14\xb0F\xd25\x19\\\xd8\xb2\xa3A\xa2\x86Vc\xee\x15=\x0e\x8a\x9a\x15'), chr(0b1100100) + chr(101) + '\143' + chr(111) + '\x64' + '\x65')('\x75' + chr(0b1110100) + chr(0b1010111 + 0o17) + '\x2d' + '\x38'))) for (SLVB2BPA_mIe, eemPYp2vtTSr) in roI3spqORKae(hXMPsSrOQzbh._queues, roI3spqORKae(ES5oEprVxulp(b'\x12\x80F\xc3\x15\x1bw\x84\xe0\xbb~\xae'), chr(0b1100100) + chr(3814 - 3713) + chr(1971 - 1872) + chr(11517 - 11406) + chr(100) + chr(0b1100010 + 0o3))(chr(0b1100000 + 0o25) + '\x74' + chr(0b11110 + 0o110) + '\x2d' + chr(613 - 557)))(): roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b':\xaaM\xf85>[\xd5\xb0\xa1G\xb5\xbc'), chr(0b1100100) + '\145' + '\x63' + chr(8864 - 8753) + chr(100) + chr(0b1010 + 0o133))(chr(0b1110101) + chr(0b1001011 + 0o51) + chr(2390 - 2288) + '\x2d' + chr(0b110001 + 0o7)))(queue=SLVB2BPA_mIe, durable=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'/\xaaZ\xec2\rZ'), '\x64' + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(0b101000 + 0o115) + chr(6123 - 6007) + chr(8925 - 8823) + chr(45) + chr(2852 - 2796))], auto_delete=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'*\xaa\\\xe2\x0f\x05Z\xdc\xb6\xb9C'), chr(4746 - 4646) + chr(0b1011 + 0o132) + chr(99) + chr(0b1101111) + chr(0b101001 + 0o73) + chr(304 - 203))(chr(0b1110101) + chr(11681 - 11565) + chr(0b1000100 + 0o42) + chr(0b101101) + chr(0b1100 + 0o54))], exclusive=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'.\xa7K\xe1%\x12V\xc6\xb6'), chr(0b11011 + 0o111) + chr(4451 - 4350) + chr(0b1100011) + '\157' + chr(100) + chr(0b100100 + 0o101))(chr(0b1110101) + chr(5555 - 5439) + '\x66' + chr(45) + chr(0b111000))], arguments=eemPYp2vtTSr[roI3spqORKae(ES5oEprVxulp(b'*\xadO\xf8=\x04Q\xc4\xa0'), chr(0b1000101 + 0o37) + chr(101) + chr(0b1100011) + '\x6f' + chr(100) + chr(4112 - 4011))(chr(10480 - 10363) + chr(116) + chr(0b1100110) + '\055' + '\070')], passive=roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'*\x9a{\xdef&H\xc8\xbc\x97N\x86'), '\144' + '\x65' + chr(0b1011111 + 0o4) + '\x6f' + chr(100) + '\x65')('\165' + chr(0b1100100 + 0o20) + '\146' + '\x2d' + chr(0b10110 + 0o42)))[roI3spqORKae(ES5oEprVxulp(b';\xbe[\xfe9\x17Z\xef\xb7\xa8E\xab\xb8@c\xfe'), chr(100) + chr(5327 - 5226) + '\x63' + chr(0b110111 + 0o70) + chr(0b1000101 + 0o37) + '\x65')(chr(0b1110101) + '\164' + '\146' + '\055' + '\070')], callback=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x14\xb0F\xd2!\x14Z\xc5\xb6\x92B\xa2\xba^g\xff\x1c3\x17'), '\x64' + chr(101) + '\143' + chr(0b1011100 + 0o23) + '\x64' + chr(0b1100101 + 0o0))(chr(2374 - 2257) + '\164' + chr(0b1100110) + '\055' + chr(0b111000))))
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_channel_close
def _on_channel_close(self, channel, reply_code_or_reason, reply_text=None): """ Callback invoked when the channel is closed. Args: channel (pika.channel.Channel): The channel that got closed. reply_code_or_reason (int|Exception): The reason why the channel was closed. In older versions of pika, this is the AMQP code. reply_text (str): The human-readable reason for the channel's closure (only in older versions of pika). """ if isinstance(reply_code_or_reason, pika_errs.ChannelClosed): reply_code = reply_code_or_reason.reply_code reply_text = reply_code_or_reason.reply_text elif isinstance(reply_code_or_reason, int): reply_code = reply_code_or_reason else: reply_code = 0 reply_text = str(reply_code_or_reason) _log.info("Channel %r closed (%d): %s", channel, reply_code, reply_text) self._channel = None
python
def _on_channel_close(self, channel, reply_code_or_reason, reply_text=None): """ Callback invoked when the channel is closed. Args: channel (pika.channel.Channel): The channel that got closed. reply_code_or_reason (int|Exception): The reason why the channel was closed. In older versions of pika, this is the AMQP code. reply_text (str): The human-readable reason for the channel's closure (only in older versions of pika). """ if isinstance(reply_code_or_reason, pika_errs.ChannelClosed): reply_code = reply_code_or_reason.reply_code reply_text = reply_code_or_reason.reply_text elif isinstance(reply_code_or_reason, int): reply_code = reply_code_or_reason else: reply_code = 0 reply_text = str(reply_code_or_reason) _log.info("Channel %r closed (%d): %s", channel, reply_code, reply_text) self._channel = None
[ "def", "_on_channel_close", "(", "self", ",", "channel", ",", "reply_code_or_reason", ",", "reply_text", "=", "None", ")", ":", "if", "isinstance", "(", "reply_code_or_reason", ",", "pika_errs", ".", "ChannelClosed", ")", ":", "reply_code", "=", "reply_code_or_reason", ".", "reply_code", "reply_text", "=", "reply_code_or_reason", ".", "reply_text", "elif", "isinstance", "(", "reply_code_or_reason", ",", "int", ")", ":", "reply_code", "=", "reply_code_or_reason", "else", ":", "reply_code", "=", "0", "reply_text", "=", "str", "(", "reply_code_or_reason", ")", "_log", ".", "info", "(", "\"Channel %r closed (%d): %s\"", ",", "channel", ",", "reply_code", ",", "reply_text", ")", "self", ".", "_channel", "=", "None" ]
Callback invoked when the channel is closed. Args: channel (pika.channel.Channel): The channel that got closed. reply_code_or_reason (int|Exception): The reason why the channel was closed. In older versions of pika, this is the AMQP code. reply_text (str): The human-readable reason for the channel's closure (only in older versions of pika).
[ "Callback", "invoked", "when", "the", "channel", "is", "closed", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L290-L311
train
Callback invoked when the channel is closed.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FN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6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(2056 - 1945) + chr(1631 - 1581) + chr(54) + chr(0b10000 + 0o42), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(2076 - 2027) + chr(0b1101 + 0o47) + chr(0b10111 + 0o37), 0b1000), nzTpIcepk0o8(chr(589 - 541) + '\157' + '\x31' + chr(51) + chr(55), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + '\061' + chr(0b110001) + chr(0b10010 + 0o40), 60739 - 60731), nzTpIcepk0o8(chr(1064 - 1016) + chr(7371 - 7260) + chr(0b11011 + 0o27) + chr(769 - 714) + chr(2716 - 2663), 44371 - 44363), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + '\061' + chr(55) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1011000 + 0o27) + chr(51) + chr(0b110001) + chr(2174 - 2124), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110111) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1110 + 0o141) + '\x34' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(52), 0b1000), nzTpIcepk0o8(chr(1235 - 1187) + '\x6f' + chr(0b11110 + 0o25) + chr(0b110000) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\061' + '\x33' + '\x37', 8), nzTpIcepk0o8(chr(48) + chr(111) + '\x36' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7376 - 7265) + chr(1649 - 1594) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + '\061', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(1938 - 1888) + '\x37' + chr(0b1110 + 0o51), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(54) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + '\x34' + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(762 - 712) + chr(51) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(394 - 346) + '\x6f' + chr(0b10000 + 0o43) + '\x35' + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b100001 + 0o25) + chr(992 - 939), 10370 - 10362), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(197 - 145) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(11207 - 11096) + '\x33' + chr(0b100010 + 0o20) + '\x34', 0b1000), nzTpIcepk0o8(chr(1615 - 1567) + chr(0b1001 + 0o146) + '\x31' + '\061' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3293 - 3182) + chr(0b110000 + 0o2) + chr(0b110010) + chr(0b100 + 0o61), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1141 - 1091) + '\063' + '\x30', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(489 - 439) + chr(1415 - 1360) + '\x37', 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(10720 - 10609) + chr(0b110011) + chr(0b100011 + 0o15) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(529 - 481) + chr(111) + chr(0b100100 + 0o15) + chr(0b11000 + 0o33) + '\060', 28340 - 28332), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x31', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1327 - 1278) + chr(1106 - 1053) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(11345 - 11234) + chr(2122 - 2073) + '\x37' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + '\062' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(2772 - 2661) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x31' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110100) + '\067', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1110 + 0o45) + chr(0b100101 + 0o13) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\065' + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + '\061' + chr(52) + chr(1457 - 1407), 0o10), nzTpIcepk0o8(chr(1681 - 1633) + '\x6f' + chr(0b10111 + 0o32) + chr(0b110111) + chr(0b110100), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + '\065' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9c'), chr(100) + '\x65' + chr(7338 - 7239) + chr(0b1101111) + chr(100) + chr(101))('\x75' + chr(8077 - 7961) + chr(1781 - 1679) + chr(0b11100 + 0o21) + chr(83 - 27)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def EDfoRf64RVuX(hXMPsSrOQzbh, qiE6ZboUDe50, gam1T3Uy3HbJ, FAr6SQtkATtb=None): if suIjIS24Zkqw(gam1T3Uy3HbJ, roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xf1\x0e>$\xd3\x1b\xa6<Jc\xb0:R'), chr(100) + chr(7755 - 7654) + chr(99) + chr(0b111001 + 0o66) + chr(100) + '\x65')(chr(3003 - 2886) + '\x74' + chr(8565 - 8463) + chr(45) + '\x38'))): qHiKV4ClYZhK = gam1T3Uy3HbJ.reply_code FAr6SQtkATtb = gam1T3Uy3HbJ.reply_text elif suIjIS24Zkqw(gam1T3Uy3HbJ, nzTpIcepk0o8): qHiKV4ClYZhK = gam1T3Uy3HbJ else: qHiKV4ClYZhK = nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(48), ord("\x08")) FAr6SQtkATtb = N9zlRy29S1SS(gam1T3Uy3HbJ) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xdb\x1e\x112\x842\xbd \x17k\xb1\x10'), '\x64' + '\x65' + '\143' + chr(4374 - 4263) + chr(9664 - 9564) + '\x65')('\x75' + chr(12911 - 12795) + chr(0b1100110) + chr(0b101101) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xf1\x0e>$\xd3\x1b\xa6_\x03~\xe3<ZTb\xdaS\x07\xb5\xca\xd1\x8b\xeeo\xb0\xeb'), chr(100) + chr(0b1100101) + '\143' + chr(8372 - 8261) + chr(0b111011 + 0o51) + '\x65')('\x75' + chr(0b1110100) + chr(0b1010110 + 0o20) + chr(0b101101) + '\070'), qiE6ZboUDe50, qHiKV4ClYZhK, FAr6SQtkATtb) hXMPsSrOQzbh.oO1rBQeetvBW = None
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_connection_open
def _on_connection_open(self, connection): """ Callback invoked when the connection is successfully established. Args: connection (pika.connection.SelectConnection): The newly-estabilished connection. """ _log.info("Successfully opened connection to %s", connection.params.host) self._channel = connection.channel(on_open_callback=self._on_channel_open)
python
def _on_connection_open(self, connection): """ Callback invoked when the connection is successfully established. Args: connection (pika.connection.SelectConnection): The newly-estabilished connection. """ _log.info("Successfully opened connection to %s", connection.params.host) self._channel = connection.channel(on_open_callback=self._on_channel_open)
[ "def", "_on_connection_open", "(", "self", ",", "connection", ")", ":", "_log", ".", "info", "(", "\"Successfully opened connection to %s\"", ",", "connection", ".", "params", ".", "host", ")", "self", ".", "_channel", "=", "connection", ".", "channel", "(", "on_open_callback", "=", "self", ".", "_on_channel_open", ")" ]
Callback invoked when the connection is successfully established. Args: connection (pika.connection.SelectConnection): The newly-estabilished connection.
[ "Callback", "invoked", "when", "the", "connection", "is", "successfully", "established", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L313-L322
train
Callback invoked when the connection is successfully established.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwL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xgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(1994 - 1939) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + chr(0b110011) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(9540 - 9429) + '\x33' + chr(0b100100 + 0o14), 0b1000), nzTpIcepk0o8('\060' + chr(946 - 835) + '\x32' + '\061' + chr(51), 58240 - 58232), nzTpIcepk0o8(chr(1757 - 1709) + chr(111) + chr(0b110010) + chr(2746 - 2693) + chr(1134 - 1081), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(51) + chr(582 - 529), 0o10), nzTpIcepk0o8(chr(1187 - 1139) + '\157' + '\065' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(50) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110100) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111111 + 0o60) + chr(0b10001 + 0o40) + chr(0b110101) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4764 - 4653) + chr(0b110001) + '\064' + '\064', 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\x32' + '\063' + '\065', 16436 - 16428), nzTpIcepk0o8('\060' + chr(8772 - 8661) + chr(0b1000 + 0o53) + '\x32' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(11095 - 10984) + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b110010 + 0o75) + chr(0b110011) + chr(0b10101 + 0o41) + chr(1534 - 1482), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(51) + chr(2229 - 2176), 64314 - 64306), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(49) + chr(0b110000) + '\x31', 0o10), nzTpIcepk0o8(chr(1804 - 1756) + chr(0b1101111) + '\x33' + chr(0b100100 + 0o17) + '\065', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1001 + 0o146) + '\064' + chr(2159 - 2104), 0b1000), nzTpIcepk0o8(chr(283 - 235) + chr(10666 - 10555) + chr(51) + chr(0b110001) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110011) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b111101 + 0o62) + chr(0b110100) + '\064', 28922 - 28914), nzTpIcepk0o8('\060' + chr(2606 - 2495) + chr(49) + chr(2365 - 2314) + chr(48), 27920 - 27912), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110110) + chr(0b11010 + 0o26), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(51) + chr(1930 - 1879), 14294 - 14286), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2175 - 2126) + chr(50) + chr(0b11010 + 0o32), ord("\x08")), nzTpIcepk0o8('\060' + chr(8462 - 8351) + '\x36' + chr(54), 56057 - 56049), nzTpIcepk0o8('\x30' + chr(0b110111 + 0o70) + chr(0b110001 + 0o2), 5888 - 5880), nzTpIcepk0o8(chr(0b110000) + chr(3633 - 3522) + chr(0b110010) + '\065' + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(48) + chr(0b11111 + 0o22), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1743 - 1692) + chr(0b10010 + 0o36) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(1261 - 1210) + chr(52) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101101 + 0o5) + chr(52) + chr(0b10110 + 0o33), 42621 - 42613), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(0b110001 + 0o0) + '\062' + chr(1748 - 1700), 0b1000), nzTpIcepk0o8(chr(2196 - 2148) + chr(0b1101111) + chr(2200 - 2151) + chr(0b110100) + '\x32', 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b110001 + 0o76) + '\063' + '\063' + chr(0b1100 + 0o50), ord("\x08")), nzTpIcepk0o8('\060' + chr(8226 - 8115) + '\x32' + chr(49) + '\064', 23672 - 23664), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(599 - 548) + chr(0b1011 + 0o47) + '\064', ord("\x08")), nzTpIcepk0o8(chr(2087 - 2039) + '\157' + chr(0b110111) + chr(1493 - 1445), 43821 - 43813), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110100) + '\x37', 34713 - 34705)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + '\x35' + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x15'), chr(0b100000 + 0o104) + chr(0b1010001 + 0o24) + '\143' + chr(111) + '\144' + '\x65')('\165' + chr(0b1110100) + '\x66' + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fNiVlCU2NRVe(hXMPsSrOQzbh, sUnMikkvNtWr): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'RdV\xf3\x94\x11_L\x12\x08\x16\xd2'), chr(0b101011 + 0o71) + chr(0b11000 + 0o115) + chr(0b1100011) + chr(0b1101111) + chr(0b1001110 + 0o26) + chr(101))('\165' + chr(116) + chr(347 - 245) + '\x2d' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'hi{\xe8\xc8.[uV\x03\x08\xe4\xf6~\x84\xb8/\xb8C\xe88K6\x9e\xbe7Bj\xc5\xef\xe0\x93\xcepG\xaf'), chr(100) + chr(8961 - 8860) + chr(99) + chr(2155 - 2044) + '\144' + '\x65')('\x75' + chr(0b1110100) + chr(102) + '\055' + '\070'), roI3spqORKae(sUnMikkvNtWr.params, roI3spqORKae(ES5oEprVxulp(b'n\x7fB\xe4\xcb\x10IwjZ\x0c\xd9'), '\x64' + '\145' + '\143' + chr(0b111001 + 0o66) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + '\070'))) hXMPsSrOQzbh.oO1rBQeetvBW = sUnMikkvNtWr.qiE6ZboUDe50(on_open_callback=hXMPsSrOQzbh._on_channel_open)
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_connection_close
def _on_connection_close(self, connection, reply_code_or_reason, reply_text=None): """ Callback invoked when a previously-opened connection is closed. Args: connection (pika.connection.SelectConnection): The connection that was just closed. reply_code_or_reason (int|Exception): The reason why the channel was closed. In older versions of pika, this is the AMQP code. reply_text (str): The human-readable reason the connection was closed (only in older versions of pika) """ self._channel = None if isinstance(reply_code_or_reason, pika_errs.ConnectionClosed): reply_code = reply_code_or_reason.reply_code reply_text = reply_code_or_reason.reply_text elif isinstance(reply_code_or_reason, int): reply_code = reply_code_or_reason else: reply_code = 0 reply_text = str(reply_code_or_reason) if reply_code == 200: # Normal shutdown, exit the consumer. _log.info("Server connection closed (%s), shutting down", reply_text) connection.ioloop.stop() else: _log.warning( "Connection to %s closed unexpectedly (%d): %s", connection.params.host, reply_code, reply_text, ) self.call_later(1, self.reconnect)
python
def _on_connection_close(self, connection, reply_code_or_reason, reply_text=None): """ Callback invoked when a previously-opened connection is closed. Args: connection (pika.connection.SelectConnection): The connection that was just closed. reply_code_or_reason (int|Exception): The reason why the channel was closed. In older versions of pika, this is the AMQP code. reply_text (str): The human-readable reason the connection was closed (only in older versions of pika) """ self._channel = None if isinstance(reply_code_or_reason, pika_errs.ConnectionClosed): reply_code = reply_code_or_reason.reply_code reply_text = reply_code_or_reason.reply_text elif isinstance(reply_code_or_reason, int): reply_code = reply_code_or_reason else: reply_code = 0 reply_text = str(reply_code_or_reason) if reply_code == 200: # Normal shutdown, exit the consumer. _log.info("Server connection closed (%s), shutting down", reply_text) connection.ioloop.stop() else: _log.warning( "Connection to %s closed unexpectedly (%d): %s", connection.params.host, reply_code, reply_text, ) self.call_later(1, self.reconnect)
[ "def", "_on_connection_close", "(", "self", ",", "connection", ",", "reply_code_or_reason", ",", "reply_text", "=", "None", ")", ":", "self", ".", "_channel", "=", "None", "if", "isinstance", "(", "reply_code_or_reason", ",", "pika_errs", ".", "ConnectionClosed", ")", ":", "reply_code", "=", "reply_code_or_reason", ".", "reply_code", "reply_text", "=", "reply_code_or_reason", ".", "reply_text", "elif", "isinstance", "(", "reply_code_or_reason", ",", "int", ")", ":", "reply_code", "=", "reply_code_or_reason", "else", ":", "reply_code", "=", "0", "reply_text", "=", "str", "(", "reply_code_or_reason", ")", "if", "reply_code", "==", "200", ":", "# Normal shutdown, exit the consumer.", "_log", ".", "info", "(", "\"Server connection closed (%s), shutting down\"", ",", "reply_text", ")", "connection", ".", "ioloop", ".", "stop", "(", ")", "else", ":", "_log", ".", "warning", "(", "\"Connection to %s closed unexpectedly (%d): %s\"", ",", "connection", ".", "params", ".", "host", ",", "reply_code", ",", "reply_text", ",", ")", "self", ".", "call_later", "(", "1", ",", "self", ".", "reconnect", ")" ]
Callback invoked when a previously-opened connection is closed. Args: connection (pika.connection.SelectConnection): The connection that was just closed. reply_code_or_reason (int|Exception): The reason why the channel was closed. In older versions of pika, this is the AMQP code. reply_text (str): The human-readable reason the connection was closed (only in older versions of pika)
[ "Callback", "invoked", "when", "a", "previously", "-", "opened", "connection", "is", "closed", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L324-L358
train
Callback invoked when a previously - opened connection is closed.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,Z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yvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(1093 - 1043) + '\x36' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\x32' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(837 - 787) + chr(48), 47784 - 47776), nzTpIcepk0o8(chr(1223 - 1175) + chr(111) + '\x31' + '\x35' + '\064', 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + '\062' + chr(0b0 + 0o61) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110 + 0o56) + '\064', 0o10), nzTpIcepk0o8(chr(1640 - 1592) + chr(3906 - 3795) + chr(161 - 106) + chr(48), 38702 - 38694), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(54), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(49) + chr(0b1010 + 0o52), 11485 - 11477), nzTpIcepk0o8('\x30' + chr(111) + chr(538 - 489) + chr(0b10100 + 0o40) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + chr(0b110110) + '\065', 0o10), nzTpIcepk0o8(chr(1509 - 1461) + '\157' + chr(0b110011) + chr(0b110110) + '\061', 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(943 - 893) + '\064' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110000) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + '\x31' + chr(51) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(995 - 884) + '\063' + chr(0b1000 + 0o53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3837 - 3726) + chr(54) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2461 - 2410) + '\x35' + '\x37', 63534 - 63526), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(1385 - 1337) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(1629 - 1581) + chr(0b1101111) + '\063' + '\x36' + '\065', 43692 - 43684), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1772 - 1722) + chr(0b1001 + 0o51) + chr(260 - 212), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6775 - 6664) + chr(0b100110 + 0o13) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(2097 - 2049) + chr(111) + chr(0b110010) + '\062' + '\064', 61709 - 61701), nzTpIcepk0o8(chr(772 - 724) + chr(0b1101111) + '\061' + chr(1549 - 1495), 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1101111) + chr(49) + '\x35' + chr(48), 51323 - 51315), nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + chr(0b10 + 0o65) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + chr(0b110 + 0o55) + '\067' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(3867 - 3756) + chr(0b110011) + chr(52) + chr(48), 62702 - 62694), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10000 + 0o41) + chr(1060 - 1010) + chr(1380 - 1328), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(2235 - 2185) + chr(50) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(4434 - 4323) + chr(0b110001) + '\x37' + chr(0b110000 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(645 - 597) + chr(0b1101111) + '\061' + '\x32' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(53) + chr(48), 0o10), nzTpIcepk0o8(chr(97 - 49) + chr(111) + '\x31' + chr(0b110001) + chr(553 - 499), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(53) + chr(0b110000), 52102 - 52094), nzTpIcepk0o8(chr(1954 - 1906) + chr(111) + chr(2281 - 2230) + chr(2769 - 2715) + chr(0b11011 + 0o33), 61732 - 61724), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110011) + chr(0b110101), 62976 - 62968), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(1908 - 1853) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(0b110001) + '\x35' + chr(2069 - 2017), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(10484 - 10373) + '\065' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9f'), chr(0b1100100) + chr(203 - 102) + chr(0b101111 + 0o64) + '\157' + chr(0b10000 + 0o124) + chr(101))('\165' + chr(116) + '\x66' + chr(0b10 + 0o53) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def OocnUcYVkiKq(hXMPsSrOQzbh, sUnMikkvNtWr, gam1T3Uy3HbJ, FAr6SQtkATtb=None): hXMPsSrOQzbh.oO1rBQeetvBW = None if suIjIS24Zkqw(gam1T3Uy3HbJ, roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b'\xf2:\xbe\x02\xeaGLwc\x0ev\x9d\xcb3?\x7f'), chr(0b1100100) + chr(101) + chr(99) + chr(9577 - 9466) + '\x64' + chr(7034 - 6933))(chr(10144 - 10027) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b111000)))): qHiKV4ClYZhK = gam1T3Uy3HbJ.reply_code FAr6SQtkATtb = gam1T3Uy3HbJ.reply_text elif suIjIS24Zkqw(gam1T3Uy3HbJ, nzTpIcepk0o8): qHiKV4ClYZhK = gam1T3Uy3HbJ else: qHiKV4ClYZhK = nzTpIcepk0o8('\060' + '\x6f' + chr(0b110000), 0o10) FAr6SQtkATtb = N9zlRy29S1SS(gam1T3Uy3HbJ) if qHiKV4ClYZhK == nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(1684 - 1573) + chr(0b1 + 0o62) + chr(49) + chr(0b110000), 59367 - 59359): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xd8-\x9e\x14\xb6hOA=\x07G\xbe'), '\144' + chr(0b1100101) + chr(99) + chr(111) + chr(0b1001011 + 0o31) + chr(0b100110 + 0o77))('\x75' + '\x74' + chr(5481 - 5379) + chr(0b101101) + chr(2996 - 2940)))(roI3spqORKae(ES5oEprVxulp(b'\xe20\xa2\x1a\xeaV\x18}c\x0e[\x94\xc743t^\xcf\xa7\x99\x00\xe3k\xf0.@\x1e\x8b\xc9x\xb7\n>\x9d:\xdc\x9f3\x1bL\xd5:\xa7\x02'), chr(100) + chr(0b111011 + 0o52) + '\143' + '\157' + chr(100) + '\x65')(chr(10207 - 10090) + '\x74' + chr(102) + chr(0b100001 + 0o14) + chr(0b111000)), FAr6SQtkATtb) roI3spqORKae(sUnMikkvNtWr.ioloop, roI3spqORKae(ES5oEprVxulp(b'\xd5\x0c\x9a\x0e\xcdMaQS\x0er\xb4'), chr(100) + chr(0b1100101) + chr(0b10101 + 0o116) + '\157' + '\x64' + '\x65')(chr(4344 - 4227) + '\x74' + '\146' + chr(0b101101) + '\070'))() else: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'\xc64\xa2\x02\xe6J_'), chr(5714 - 5614) + chr(0b1100101) + chr(0b1100011) + chr(0b1101110 + 0o1) + chr(9604 - 9504) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b110100 + 0o62) + chr(726 - 681) + chr(0b1010 + 0o56)))(roI3spqORKae(ES5oEprVxulp(b'\xf2:\xbe\x02\xeaGLwc\x0e\x15\x85\xcb`\x7fh\x10\x8c\xa8\x9a\x1c\xf5j\xb4{\x06^\x80\x901\xf4\r3\x8c"\xd1\xd6uY\x08\x98o\xf0I\xfc'), '\x64' + chr(0b1100101) + chr(0b11011 + 0o110) + chr(0b1101001 + 0o6) + chr(0b1010101 + 0o17) + chr(0b100100 + 0o101))('\165' + '\164' + chr(0b1100110) + chr(0b10 + 0o53) + chr(1990 - 1934)), roI3spqORKae(sUnMikkvNtWr.params, roI3spqORKae(ES5oEprVxulp(b'\xe46\x8a\x03\xe9iYzEU]\xb5'), chr(100) + chr(3652 - 3551) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(102) + chr(0b101101) + chr(0b111000))), qHiKV4ClYZhK, FAr6SQtkATtb) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd24\xbc\x00\xd0HYji\x12'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + '\144' + '\x65')(chr(0b1110101) + chr(654 - 538) + '\146' + chr(0b101101) + chr(56)))(nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061', 6660 - 6652), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd5-\xb1Z\xe7J\x0bUG.t\xbd'), chr(100) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + chr(9557 - 9456))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + '\x38')))
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_connection_error
def _on_connection_error(self, connection, error_message): """ Callback invoked when the connection failed to be established. Args: connection (pika.connection.SelectConnection): The connection that failed to open. error_message (str): The reason the connection couldn't be opened. """ self._channel = None if isinstance(error_message, pika_errs.AMQPConnectionError): error_message = repr(error_message.args[0]) _log.error(error_message) self.call_later(1, self.reconnect)
python
def _on_connection_error(self, connection, error_message): """ Callback invoked when the connection failed to be established. Args: connection (pika.connection.SelectConnection): The connection that failed to open. error_message (str): The reason the connection couldn't be opened. """ self._channel = None if isinstance(error_message, pika_errs.AMQPConnectionError): error_message = repr(error_message.args[0]) _log.error(error_message) self.call_later(1, self.reconnect)
[ "def", "_on_connection_error", "(", "self", ",", "connection", ",", "error_message", ")", ":", "self", ".", "_channel", "=", "None", "if", "isinstance", "(", "error_message", ",", "pika_errs", ".", "AMQPConnectionError", ")", ":", "error_message", "=", "repr", "(", "error_message", ".", "args", "[", "0", "]", ")", "_log", ".", "error", "(", "error_message", ")", "self", ".", "call_later", "(", "1", ",", "self", ".", "reconnect", ")" ]
Callback invoked when the connection failed to be established. Args: connection (pika.connection.SelectConnection): The connection that failed to open. error_message (str): The reason the connection couldn't be opened.
[ "Callback", "invoked", "when", "the", "connection", "failed", "to", "be", "established", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L360-L373
train
Callback invoked when a connection error occurs.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW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znYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10111 + 0o31), 17480 - 17472), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b100000 + 0o117) + '\x31' + '\x33' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(1244 - 1196) + chr(0b1011110 + 0o21) + chr(0b110110) + chr(0b100101 + 0o21), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1535 - 1486) + chr(426 - 374), 0o10), nzTpIcepk0o8('\x30' + chr(7978 - 7867) + chr(50) + '\x33' + chr(0b110010), 3887 - 3879), nzTpIcepk0o8('\060' + chr(9977 - 9866) + chr(0b10111 + 0o33) + chr(0b11101 + 0o31) + chr(1768 - 1720), 46415 - 46407), nzTpIcepk0o8('\060' + chr(7837 - 7726) + chr(49) + '\066' + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(442 - 392) + '\060' + chr(1452 - 1398), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110110) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + chr(0b110011) + '\x34' + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\067' + '\064', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10 + 0o61) + '\x37' + chr(2441 - 2389), 8), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(50) + '\x31' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2214 - 2165) + chr(0b11 + 0o56) + '\061', 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(2228 - 2117) + '\x31' + chr(50) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b101110 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8291 - 8180) + chr(1685 - 1633) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b100 + 0o55) + '\066' + chr(1077 - 1027), 8), nzTpIcepk0o8(chr(406 - 358) + chr(0b1000101 + 0o52) + '\062' + chr(0b11111 + 0o23) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(506 - 456) + chr(1926 - 1873) + chr(0b101011 + 0o5), 63650 - 63642), nzTpIcepk0o8('\060' + '\157' + chr(0b100100 + 0o15) + chr(0b10110 + 0o33) + chr(2115 - 2066), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100 + 0o56) + chr(50) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11101 + 0o25) + chr(50) + chr(1577 - 1526), ord("\x08")), nzTpIcepk0o8(chr(72 - 24) + chr(9650 - 9539) + '\063' + chr(0b110100) + '\x30', 30560 - 30552), nzTpIcepk0o8('\060' + chr(10744 - 10633) + chr(0b100111 + 0o12) + '\x35' + '\060', 29514 - 29506), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(54) + chr(858 - 806), 30754 - 30746), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110000 + 0o3) + chr(55) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101101 + 0o102) + chr(49) + chr(0b11000 + 0o30) + chr(0b110101), 34932 - 34924), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b110001) + '\066', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(52) + chr(0b10011 + 0o37), 23664 - 23656), nzTpIcepk0o8('\x30' + chr(9202 - 9091) + chr(1568 - 1519) + chr(0b110111) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110101 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\061' + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + chr(0b110011) + chr(0b100011 + 0o22) + '\061', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b11101 + 0o122) + chr(2069 - 2019) + chr(52) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(935 - 887) + chr(111) + '\063' + chr(422 - 369), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x36' + chr(1672 - 1619), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + '\x33' + chr(1055 - 1007), ord("\x08")), nzTpIcepk0o8(chr(777 - 729) + chr(6232 - 6121) + chr(755 - 706) + chr(0b10111 + 0o32), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'.'), chr(7600 - 7500) + chr(101) + chr(7100 - 7001) + chr(0b1101111) + chr(100) + chr(101))('\165' + chr(13357 - 13241) + chr(0b100110 + 0o100) + chr(1556 - 1511) + chr(1915 - 1859)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def CkNX64yDp_ww(hXMPsSrOQzbh, sUnMikkvNtWr, bS7FPLkNNcSI): hXMPsSrOQzbh.oO1rBQeetvBW = None if suIjIS24Zkqw(bS7FPLkNNcSI, roI3spqORKae(wnBgmTA2zMy6, roI3spqORKae(ES5oEprVxulp(b"A\x12g\\\xd9\xdf\x1c\xe8P\x80\x88\x95\xe5'\x13sU\x1d\xe6"), chr(0b1000 + 0o134) + chr(0b10111 + 0o116) + chr(4596 - 4497) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\x74' + '\x66' + chr(0b101101) + chr(732 - 676)))): bS7FPLkNNcSI = VWshwTzZfwvC(bS7FPLkNNcSI.eemPYp2vtTSr[nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b111 + 0o51), 8)]) roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'q6\x07{\xf3\xc0"\xd0C\xa6\xb7\x98'), '\144' + chr(0b11010 + 0o113) + '\x63' + chr(3866 - 3755) + '\x64' + '\145')(chr(0b10111 + 0o136) + chr(116) + '\146' + chr(0b101101) + '\x38'))(bS7FPLkNNcSI) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'c>Z`\xc5\xdc\x13\xf2P\x91'), chr(100) + '\145' + '\x63' + '\x6f' + chr(0b1100100) + chr(3310 - 3209))('\165' + chr(116) + '\x66' + chr(45) + chr(0b111000)))(nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"d'W:\xf2\xdeA\xcd~\xad\xbd\xb0"), '\144' + chr(101) + chr(8620 - 8521) + chr(11602 - 11491) + chr(100) + chr(101))('\x75' + '\164' + chr(102) + '\x2d' + '\x38')))
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_queue_declareok
def _on_queue_declareok(self, frame): """ Callback invoked when a queue is successfully declared. Args: frame (pika.frame.Method): The message sent from the server. """ _log.info("Successfully declared the %s queue", frame.method.queue) for binding in self._bindings: if binding["queue"] == frame.method.queue: for key in binding["routing_keys"]: _log.info( "Asserting %s is bound to %s with the %s key", binding["queue"], binding["exchange"], key, ) self._channel.queue_bind( callback=None, queue=binding["queue"], exchange=binding["exchange"], routing_key=key, ) bc_args = dict(queue=frame.method.queue) if _pika_version < pkg_resources.parse_version("1.0.0b1"): bc_args["consumer_callback"] = self._on_message else: bc_args["on_message_callback"] = self._on_message tag = self._channel.basic_consume(**bc_args) self._consumers[tag] = binding["queue"]
python
def _on_queue_declareok(self, frame): """ Callback invoked when a queue is successfully declared. Args: frame (pika.frame.Method): The message sent from the server. """ _log.info("Successfully declared the %s queue", frame.method.queue) for binding in self._bindings: if binding["queue"] == frame.method.queue: for key in binding["routing_keys"]: _log.info( "Asserting %s is bound to %s with the %s key", binding["queue"], binding["exchange"], key, ) self._channel.queue_bind( callback=None, queue=binding["queue"], exchange=binding["exchange"], routing_key=key, ) bc_args = dict(queue=frame.method.queue) if _pika_version < pkg_resources.parse_version("1.0.0b1"): bc_args["consumer_callback"] = self._on_message else: bc_args["on_message_callback"] = self._on_message tag = self._channel.basic_consume(**bc_args) self._consumers[tag] = binding["queue"]
[ "def", "_on_queue_declareok", "(", "self", ",", "frame", ")", ":", "_log", ".", "info", "(", "\"Successfully declared the %s queue\"", ",", "frame", ".", "method", ".", "queue", ")", "for", "binding", "in", "self", ".", "_bindings", ":", "if", "binding", "[", "\"queue\"", "]", "==", "frame", ".", "method", ".", "queue", ":", "for", "key", "in", "binding", "[", "\"routing_keys\"", "]", ":", "_log", ".", "info", "(", "\"Asserting %s is bound to %s with the %s key\"", ",", "binding", "[", "\"queue\"", "]", ",", "binding", "[", "\"exchange\"", "]", ",", "key", ",", ")", "self", ".", "_channel", ".", "queue_bind", "(", "callback", "=", "None", ",", "queue", "=", "binding", "[", "\"queue\"", "]", ",", "exchange", "=", "binding", "[", "\"exchange\"", "]", ",", "routing_key", "=", "key", ",", ")", "bc_args", "=", "dict", "(", "queue", "=", "frame", ".", "method", ".", "queue", ")", "if", "_pika_version", "<", "pkg_resources", ".", "parse_version", "(", "\"1.0.0b1\"", ")", ":", "bc_args", "[", "\"consumer_callback\"", "]", "=", "self", ".", "_on_message", "else", ":", "bc_args", "[", "\"on_message_callback\"", "]", "=", "self", ".", "_on_message", "tag", "=", "self", ".", "_channel", ".", "basic_consume", "(", "*", "*", "bc_args", ")", "self", ".", "_consumers", "[", "tag", "]", "=", "binding", "[", "\"queue\"", "]" ]
Callback invoked when a queue is successfully declared. Args: frame (pika.frame.Method): The message sent from the server.
[ "Callback", "invoked", "when", "a", "queue", "is", "successfully", "declared", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L388-L417
train
Invoked when a queue is successfully declared.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF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XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b110000) + '\x31', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + '\062' + chr(0b110010) + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + chr(49) + '\063' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(48) + chr(0b100010 + 0o24), 8825 - 8817), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + '\063' + '\060' + chr(2304 - 2254), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101000 + 0o12) + chr(54) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(681 - 633) + chr(111) + chr(0b101111 + 0o2) + '\067' + '\066', 0o10), nzTpIcepk0o8(chr(484 - 436) + chr(0b1101111) + '\063' + chr(1412 - 1361) + '\x34', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\066' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111 + 0o150) + '\062' + '\067' + '\067', 29829 - 29821), nzTpIcepk0o8(chr(48) + '\x6f' + chr(910 - 859) + '\x33' + chr(1944 - 1894), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(54) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + chr(0b110101 + 0o1) + chr(297 - 244), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100000 + 0o22) + chr(0b11000 + 0o34) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b110111) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b10 + 0o62), 56697 - 56689), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(51) + chr(1352 - 1297), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(249 - 201) + chr(0b11101 + 0o122) + chr(715 - 664) + chr(0b110110) + '\x31', 15053 - 15045), nzTpIcepk0o8('\060' + chr(111) + chr(281 - 232) + chr(0b110011) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2422 - 2372) + chr(0b11001 + 0o33) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(1672 - 1624) + chr(0b1101111) + chr(0b101110 + 0o5) + chr(51) + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x33' + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + '\x32' + chr(0b110110) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + chr(0b101001 + 0o14) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(12147 - 12036) + chr(711 - 661) + '\x37' + '\x36', 63235 - 63227), nzTpIcepk0o8('\060' + chr(1348 - 1237) + chr(0b110011) + '\063' + chr(1091 - 1041), 8), nzTpIcepk0o8(chr(1165 - 1117) + '\157' + '\063' + '\x30' + '\066', 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b10111 + 0o33) + chr(1896 - 1846), 0o10), nzTpIcepk0o8(chr(48) + chr(1766 - 1655) + '\x31' + '\x34' + chr(0b10111 + 0o35), 0b1000), nzTpIcepk0o8(chr(1225 - 1177) + chr(8052 - 7941) + '\063' + chr(0b110001) + chr(1781 - 1727), 36525 - 36517), nzTpIcepk0o8('\060' + '\157' + '\x34', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + chr(1491 - 1380) + chr(49) + chr(0b110101) + chr(1462 - 1409), 58218 - 58210), nzTpIcepk0o8('\060' + chr(0b100001 + 0o116) + '\x32' + chr(0b11 + 0o56) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110111) + '\063', 0b1000), nzTpIcepk0o8(chr(937 - 889) + '\x6f' + chr(0b110001) + '\x32' + chr(949 - 900), 9934 - 9926), nzTpIcepk0o8(chr(48) + chr(4581 - 4470) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110110) + '\x37', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2720 - 2667) + '\060', 17124 - 17116)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'o'), chr(0b1111 + 0o125) + chr(0b11110 + 0o107) + chr(99) + chr(5055 - 4944) + chr(0b1010001 + 0o23) + chr(101))(chr(6706 - 6589) + chr(0b1101 + 0o147) + chr(0b111110 + 0o50) + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def QunvIueDN4JT(hXMPsSrOQzbh, KZ4ew2qs1HTO): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'(\xe8\x14\xfe\x1d\x8e\xc6!\xed\x12\xcd\x95'), chr(0b1100100) + chr(5342 - 5241) + chr(9645 - 9546) + '\157' + chr(100) + chr(8736 - 8635))(chr(0b1100000 + 0o25) + '\164' + '\x66' + '\055' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x12\xe59\xe5A\xb1\xc2\x18\xa9\x19\xd3\xa3\xd0Q\xc5Z`>q\x948\x83\xae\xf5\xd5\x0b\x9b\xa9\xe6c\x11\xabqf'), chr(5961 - 5861) + chr(0b10110 + 0o117) + chr(0b1000101 + 0o36) + chr(0b1101111) + chr(9057 - 8957) + chr(101))('\x75' + chr(11311 - 11195) + '\146' + '\x2d' + '\x38'), roI3spqORKae(KZ4ew2qs1HTO.method, roI3spqORKae(ES5oEprVxulp(b'(\xc29\xc0I\xa0\x80I\x9bB\xde\x83'), chr(7843 - 7743) + chr(0b1011011 + 0o12) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')('\165' + '\164' + chr(6210 - 6108) + chr(45) + chr(56)))) for kUiv6IrAIyl1 in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x07\xdd\x02\xb7P\xfb\xfe\x1c\x94\x0c\xcd\x88'), chr(0b101001 + 0o73) + '\145' + '\x63' + chr(2447 - 2336) + '\x64' + '\145')(chr(0b1110101) + chr(11220 - 11104) + '\146' + chr(45) + chr(926 - 870))): if kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'0\xe5?\xf3A'), chr(100) + chr(0b1100101) + '\143' + '\157' + chr(0b1001001 + 0o33) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(2358 - 2256) + chr(638 - 593) + chr(0b111000))] == roI3spqORKae(KZ4ew2qs1HTO.method, roI3spqORKae(ES5oEprVxulp(b'(\xc29\xc0I\xa0\x80I\x9bB\xde\x83'), chr(0b1100100) + '\145' + chr(99) + chr(111) + chr(100) + '\145')(chr(0b1110100 + 0o1) + '\164' + chr(0b1010001 + 0o25) + '\x2d' + chr(0b111000))): for QYodcsDtoGq7 in kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'3\xff/\xf2M\xac\xd6!\xb7\x10\xc6\xa9'), chr(100) + chr(0b10111 + 0o116) + chr(7436 - 7337) + chr(11534 - 11423) + chr(100) + '\x65')('\x75' + '\164' + '\146' + chr(45) + chr(56))]: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'(\xe8\x14\xfe\x1d\x8e\xc6!\xed\x12\xcd\x95'), chr(100) + chr(0b10110 + 0o117) + '\143' + '\157' + chr(2168 - 2068) + chr(9505 - 9404))('\x75' + '\x74' + chr(2437 - 2335) + chr(45) + chr(1746 - 1690)))(roI3spqORKae(ES5oEprVxulp(b'\x00\xe3)\xe3V\xb6\xd8\x10\xbbU\x9a\xa9\xd0\\\xd3\x19n0v\x9f8\x83\xae\xf2\x90\x0e\xcd\xfa\xb1{\x10\xa6$w\x05\xe8[ts\x17*\xf5#'), '\x64' + '\x65' + chr(99) + '\x6f' + chr(100) + chr(0b1011111 + 0o6))(chr(0b1110000 + 0o5) + '\164' + chr(0b1100110) + '\x2d' + chr(56)), kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'0\xe5?\xf3A'), chr(100) + chr(7228 - 7127) + chr(0b1100011) + chr(0b1100110 + 0o11) + chr(7720 - 7620) + '\x65')(chr(117) + chr(0b1001000 + 0o54) + '\146' + chr(0b10110 + 0o27) + chr(56))], kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'$\xe89\xeeE\xac\xd6\x1b'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(6924 - 6813) + chr(0b101000 + 0o74) + chr(666 - 565))(chr(0b110000 + 0o105) + chr(116) + chr(0b101 + 0o141) + chr(0b101101) + chr(1848 - 1792))], QYodcsDtoGq7) roI3spqORKae(hXMPsSrOQzbh._channel, roI3spqORKae(ES5oEprVxulp(b'0\xe5?\xf3A\x9d\xd3\x17\xb2\x11'), chr(100) + chr(0b1100101) + '\x63' + chr(4191 - 4080) + '\144' + chr(0b101001 + 0o74))(chr(4193 - 4076) + chr(0b1100111 + 0o15) + chr(9534 - 9432) + '\x2d' + chr(911 - 855)))(callback=None, queue=kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'0\xe5?\xf3A'), chr(0b1100100) + '\145' + chr(9482 - 9383) + chr(111) + '\144' + chr(2467 - 2366))(chr(0b1000110 + 0o57) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000))], exchange=kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'$\xe89\xeeE\xac\xd6\x1b'), chr(100) + chr(0b111 + 0o136) + '\143' + chr(0b1101111) + chr(0b111010 + 0o52) + chr(0b1100101))('\165' + chr(5958 - 5842) + '\x66' + chr(45) + '\x38')], routing_key=QYodcsDtoGq7) wkiNgHDI5_3G = znjnJWK64FDT(queue=KZ4ew2qs1HTO.method.iRcFmb17G7aY) if epKj36j0Axl_ < roI3spqORKae(RlNRVik21BGV, roI3spqORKae(ES5oEprVxulp(b'1\xf1(\xf5A\x9d\xc7\x1b\xae\x06\xd6\xb5\x9e'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\157' + chr(0b1100010 + 0o2) + '\145')('\x75' + chr(0b1100110 + 0o16) + chr(0b1100110) + chr(0b101101) + chr(1781 - 1725)))(roI3spqORKae(ES5oEprVxulp(b'p\xbej\xa8\x14\xa0\x80'), chr(0b111 + 0o135) + chr(8952 - 8851) + chr(0b1100011) + chr(111) + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(1303 - 1258) + chr(56))): wkiNgHDI5_3G[roI3spqORKae(ES5oEprVxulp(b'"\xff4\xf5Q\xaf\xd4\x0c\x83\x16\xde\xb6\x9cW\xc1Zg'), chr(0b100011 + 0o101) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + chr(5139 - 5038))(chr(838 - 721) + chr(116) + chr(102) + chr(0b11011 + 0o22) + chr(1962 - 1906))] = hXMPsSrOQzbh._on_message else: wkiNgHDI5_3G[roI3spqORKae(ES5oEprVxulp(b'.\xfe\x05\xebA\xb1\xc2\x1f\xbb\x10\xe0\xb9\x91Y\xcc[m<h'), '\x64' + '\145' + chr(4371 - 4272) + chr(0b1101111) + chr(4589 - 4489) + chr(0b110001 + 0o64))('\x75' + '\164' + chr(0b1100100 + 0o2) + chr(0b101101) + chr(56))] = hXMPsSrOQzbh._on_message A0gVABhHjc3L = hXMPsSrOQzbh._channel.basic_consume(**wkiNgHDI5_3G) hXMPsSrOQzbh.iv39oDB3x3mc[A0gVABhHjc3L] = kUiv6IrAIyl1[roI3spqORKae(ES5oEprVxulp(b'0\xe5?\xf3A'), '\x64' + '\145' + '\x63' + chr(111) + chr(0b1100100) + chr(8599 - 8498))(chr(117) + chr(0b1011110 + 0o26) + chr(102) + chr(0b11101 + 0o20) + chr(56))]
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession.call_later
def call_later(self, delay, callback): """Schedule a one-shot timeout given delay seconds. This method is only useful for compatibility with older versions of pika. Args: delay (float): Non-negative number of seconds from now until expiration callback (method): The callback method, having the signature `callback()` """ if hasattr(self._connection.ioloop, "call_later"): self._connection.ioloop.call_later(delay, callback) else: self._connection.ioloop.add_timeout(delay, callback)
python
def call_later(self, delay, callback): """Schedule a one-shot timeout given delay seconds. This method is only useful for compatibility with older versions of pika. Args: delay (float): Non-negative number of seconds from now until expiration callback (method): The callback method, having the signature `callback()` """ if hasattr(self._connection.ioloop, "call_later"): self._connection.ioloop.call_later(delay, callback) else: self._connection.ioloop.add_timeout(delay, callback)
[ "def", "call_later", "(", "self", ",", "delay", ",", "callback", ")", ":", "if", "hasattr", "(", "self", ".", "_connection", ".", "ioloop", ",", "\"call_later\"", ")", ":", "self", ".", "_connection", ".", "ioloop", ".", "call_later", "(", "delay", ",", "callback", ")", "else", ":", "self", ".", "_connection", ".", "ioloop", ".", "add_timeout", "(", "delay", ",", "callback", ")" ]
Schedule a one-shot timeout given delay seconds. This method is only useful for compatibility with older versions of pika. Args: delay (float): Non-negative number of seconds from now until expiration callback (method): The callback method, having the signature `callback()`
[ "Schedule", "a", "one", "-", "shot", "timeout", "given", "delay", "seconds", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L429-L443
train
Schedule a one - shot timeout given delay seconds.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k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8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101 + 0o142) + chr(49) + chr(52) + '\x31', 40224 - 40216), nzTpIcepk0o8('\x30' + chr(2592 - 2481) + '\064' + chr(0b110110), 35346 - 35338), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(0b110001) + chr(0b110 + 0o61) + chr(2463 - 2411), 0o10), nzTpIcepk0o8(chr(1259 - 1211) + '\x6f' + '\062' + '\x32' + '\x34', 14767 - 14759), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1505 - 1454) + chr(0b1010 + 0o55) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101101 + 0o2) + chr(51) + '\x31' + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + chr(1977 - 1927) + chr(0b11111 + 0o27) + chr(53), 0b1000), nzTpIcepk0o8(chr(497 - 449) + chr(11032 - 10921) + chr(0b101001 + 0o10) + chr(0b101100 + 0o11), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(3997 - 3886) + '\x31' + chr(363 - 308) + '\062', 0b1000), nzTpIcepk0o8(chr(1614 - 1566) + chr(0b100101 + 0o112) + chr(50) + '\x37' + chr(51), 24467 - 24459), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + chr(2025 - 1976) + chr(0b10100 + 0o42) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1690 - 1642) + chr(0b1101111) + '\063' + chr(492 - 441), 45198 - 45190), nzTpIcepk0o8(chr(48) + '\x6f' + '\x34' + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(2265 - 2212) + chr(0b10110 + 0o35), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\065' + '\062', 0o10), nzTpIcepk0o8(chr(2208 - 2160) + chr(1006 - 895) + chr(0b101011 + 0o6) + chr(0b10000 + 0o45), 8), nzTpIcepk0o8('\060' + chr(7925 - 7814) + chr(851 - 801) + chr(2185 - 2130) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b110001) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x30' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9859 - 9748) + chr(299 - 248) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(473 - 424) + chr(0b101011 + 0o7), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4184 - 4073) + chr(0b110001) + chr(0b110001 + 0o6) + chr(0b110011 + 0o1), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b11110 + 0o23) + chr(0b110000) + chr(2135 - 2081), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11100 + 0o25) + chr(54) + '\x30', 23599 - 23591), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101011 + 0o13) + chr(0b1101 + 0o52), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(195 - 140) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + chr(1790 - 1739) + '\x35' + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(1282 - 1229), 8), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(1827 - 1776) + chr(0b110011) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(0b11001 + 0o31) + chr(0b110010) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11531 - 11420) + chr(0b101 + 0o55) + '\061' + '\061', 14760 - 14752), nzTpIcepk0o8(chr(778 - 730) + chr(0b1101111) + chr(0b11 + 0o60) + chr(0b1110 + 0o44) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1111 + 0o43) + chr(566 - 517) + '\x30', 18156 - 18148), nzTpIcepk0o8(chr(2168 - 2120) + '\x6f' + chr(0b110010) + chr(0b110000) + chr(0b110100), 8), nzTpIcepk0o8(chr(2113 - 2065) + chr(3866 - 3755) + chr(2021 - 1972) + chr(0b110011) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x37' + chr(0b10101 + 0o36), 0o10), nzTpIcepk0o8(chr(1041 - 993) + chr(111) + chr(0b110010) + '\065' + '\x35', 0o10), nzTpIcepk0o8(chr(812 - 764) + chr(0b1100011 + 0o14) + chr(0b1000 + 0o52) + '\x33', 1875 - 1867), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\x33' + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(7214 - 7103) + chr(52) + chr(919 - 871), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1583 - 1535) + chr(0b101110 + 0o101) + chr(810 - 757) + '\x30', 55725 - 55717)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'O'), '\x64' + '\x65' + chr(0b1100011) + chr(6577 - 6466) + '\144' + chr(0b1111 + 0o126))('\165' + chr(7051 - 6935) + chr(102) + chr(0b11 + 0o52) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Cn9vj98edwn2(hXMPsSrOQzbh, At656iyyS8xP, jG5KU4UUGnk5): if dRKdVnHPFq7C(roI3spqORKae(hXMPsSrOQzbh._connection, roI3spqORKae(ES5oEprVxulp(b'.T\x1b\xdf\xa8\x84\xe2N\x1f\xe8\x1a#'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(3318 - 3218) + '\145')(chr(117) + '\164' + '\146' + chr(0b100000 + 0o15) + '\070')), roI3spqORKae(ES5oEprVxulp(b'\x02G\x10\xf8\xa5\xa5\xd4y\x1f\xc9'), chr(100) + chr(0b110111 + 0o56) + chr(0b1100011) + chr(0b11101 + 0o122) + chr(531 - 431) + chr(0b10110 + 0o117))(chr(0b1110101 + 0o0) + '\164' + chr(102) + '\x2d' + chr(0b111000))): roI3spqORKae(hXMPsSrOQzbh._connection.ioloop, roI3spqORKae(ES5oEprVxulp(b'\x02G\x10\xf8\xa5\xa5\xd4y\x1f\xc9'), '\x64' + chr(8133 - 8032) + chr(0b10001 + 0o122) + chr(0b1101111) + '\144' + '\x65')('\165' + '\164' + '\x66' + chr(1776 - 1731) + '\x38'))(At656iyyS8xP, jG5KU4UUGnk5) else: roI3spqORKae(hXMPsSrOQzbh._connection.ioloop, roI3spqORKae(ES5oEprVxulp(b'\x00B\x18\xcb\x8e\xa0\xd8h\x15\xce\x03'), '\x64' + chr(101) + chr(99) + '\x6f' + chr(0b10010 + 0o122) + chr(0b1000100 + 0o41))('\165' + chr(116) + chr(102) + '\x2d' + '\070'))(At656iyyS8xP, jG5KU4UUGnk5)
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession.reconnect
def reconnect(self): """Will be invoked by the IOLoop timer if the connection is closed. See the _on_connection_close method. """ # This is the old connection instance, stop its ioloop. self._connection.ioloop.stop() if self._running: # Create a new connection self.connect() # There is now a new connection, needs the new ioloop to run. self._connection.ioloop.start()
python
def reconnect(self): """Will be invoked by the IOLoop timer if the connection is closed. See the _on_connection_close method. """ # This is the old connection instance, stop its ioloop. self._connection.ioloop.stop() if self._running: # Create a new connection self.connect() # There is now a new connection, needs the new ioloop to run. self._connection.ioloop.start()
[ "def", "reconnect", "(", "self", ")", ":", "# This is the old connection instance, stop its ioloop.", "self", ".", "_connection", ".", "ioloop", ".", "stop", "(", ")", "if", "self", ".", "_running", ":", "# Create a new connection", "self", ".", "connect", "(", ")", "# There is now a new connection, needs the new ioloop to run.", "self", ".", "_connection", ".", "ioloop", ".", "start", "(", ")" ]
Will be invoked by the IOLoop timer if the connection is closed. See the _on_connection_close method.
[ "Will", "be", "invoked", "by", "the", "IOLoop", "timer", "if", "the", "connection", "is", "closed", ".", "See", "the", "_on_connection_close", "method", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L454-L464
train
Will be invoked by the IOLoop timer if the connection is closed.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWR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os7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(1628 - 1574) + chr(0b1111 + 0o44), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(421 - 372) + chr(0b100110 + 0o14) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(12265 - 12154) + '\x31' + chr(0b110111) + chr(702 - 651), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\067' + '\062', 58803 - 58795), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\x34', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b101101 + 0o4) + chr(52) + chr(0b110010 + 0o1), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\067' + chr(48), 0b1000), nzTpIcepk0o8(chr(2189 - 2141) + chr(111) + chr(1622 - 1572) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + '\061' + chr(112 - 61), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(1094 - 1044) + chr(49) + chr(0b110011), 8), nzTpIcepk0o8('\x30' + chr(10434 - 10323) + chr(0b110001) + chr(565 - 513) + chr(171 - 123), 49086 - 49078), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b101 + 0o152) + chr(1925 - 1874) + chr(0b110110) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1001010 + 0o45) + chr(799 - 750) + chr(0b110 + 0o52) + chr(333 - 283), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + '\x31' + '\061' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(4831 - 4720) + chr(0b100111 + 0o13) + '\061' + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(535 - 486) + chr(52) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\066' + chr(1805 - 1751), 0b1000), nzTpIcepk0o8(chr(635 - 587) + '\x6f' + chr(0b1010 + 0o47) + chr(0b110101) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(50) + '\x30' + chr(1668 - 1619), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(2792 - 2737) + chr(1063 - 1014), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1001001 + 0o46) + chr(51) + chr(0b110100) + '\x31', 58991 - 58983), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1001101 + 0o42) + chr(49) + chr(0b100111 + 0o14) + '\063', 48866 - 48858), nzTpIcepk0o8('\x30' + chr(559 - 448) + chr(0b110001 + 0o0) + '\x32' + chr(48), 0o10), nzTpIcepk0o8(chr(1097 - 1049) + chr(0b1101111) + chr(49) + '\063' + chr(1823 - 1775), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(1581 - 1532) + chr(0b111 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\x37' + chr(0b11011 + 0o33), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b110000) + chr(0b11010 + 0o30), 0o10), nzTpIcepk0o8('\060' + chr(1312 - 1201) + chr(50) + chr(0b101000 + 0o11) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(812 - 764) + chr(2654 - 2543) + '\062' + chr(0b110101) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + chr(0b110011) + chr(848 - 794), 0b1000), nzTpIcepk0o8(chr(177 - 129) + chr(0b10011 + 0o134) + '\063' + '\x37' + '\067', 0o10), nzTpIcepk0o8(chr(129 - 81) + '\157' + chr(2265 - 2216) + '\x30', 0b1000), nzTpIcepk0o8(chr(1066 - 1018) + '\157' + '\x33' + chr(0b110111) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(0b110010) + chr(0b100011 + 0o20), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\065' + chr(0b110000), 8), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(2338 - 2288) + chr(53), 0b1000), nzTpIcepk0o8(chr(1907 - 1859) + '\157' + chr(1163 - 1114) + chr(0b110001) + '\066', 0b1000), nzTpIcepk0o8(chr(1791 - 1743) + chr(0b1101111) + '\x33' + '\x37' + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(5243 - 5132) + chr(590 - 541) + chr(0b110001) + chr(0b100110 + 0o17), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(846 - 798) + chr(0b10011 + 0o134) + chr(53) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xdd'), '\x64' + '\145' + chr(250 - 151) + chr(2914 - 2803) + chr(2297 - 2197) + '\145')('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(639 - 583)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dxa6hn3KKNAL(hXMPsSrOQzbh): roI3spqORKae(hXMPsSrOQzbh._connection.ioloop, roI3spqORKae(ES5oEprVxulp(b"\x97\x0f1X^\naY\xd4\xe5'\xb0"), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1001100 + 0o30) + '\x65')(chr(117) + chr(116) + '\146' + chr(0b101101) + chr(0b110 + 0o62)))() if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xba\x10O},!\x0b!\xfb\xe22\x96'), chr(0b1100100) + chr(6588 - 6487) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + '\164' + '\x66' + '\055' + '\x38')): roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa1b\x13OQ\x10^X\xf2\xd35\x98'), '\144' + chr(0b1011111 + 0o6) + '\143' + chr(2756 - 2645) + '\144' + chr(6536 - 6435))(chr(0b1110101) + '\x74' + chr(0b110110 + 0o60) + chr(0b101011 + 0o2) + chr(300 - 244)))() roI3spqORKae(hXMPsSrOQzbh._connection.ioloop, roI3spqORKae(ES5oEprVxulp(b'\xb8\x07\x19rZ7[z\xd4\xc7+\x8c'), '\x64' + chr(0b1011 + 0o132) + '\x63' + chr(0b1101101 + 0o2) + '\x64' + chr(101))(chr(117) + chr(0b101 + 0o157) + '\x66' + chr(138 - 93) + '\070'))()
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession.consume
def consume(self, callback, bindings=None, queues=None, exchanges=None): """ Consume messages from a message queue. Simply define a callable to be used as the callback when messages are delivered and specify the queue bindings. This call blocks. The callback signature should accept a single positional argument which is an instance of a :class:`Message` (or a sub-class of it). Args: callback (callable): The callable to pass the message to when one arrives. bindings (list of dict): A list of dictionaries describing bindings for queues. Refer to the :ref:`conf-bindings` configuration documentation for the format. queues (dict): A dictionary of queues to ensure exist. Refer to the :ref:`conf-queues` configuration documentation for the format. exchanges (dict): A dictionary of exchanges to ensure exist. Refer to the :ref:`conf-exchanges` configuration documentation for the format. Raises: HaltConsumer: Raised when the consumer halts. ValueError: If the callback isn't a callable object or a class with __call__ defined. """ self._bindings = bindings or config.conf["bindings"] self._queues = queues or config.conf["queues"] self._exchanges = exchanges or config.conf["exchanges"] # If the callback is a class, create an instance of it first if inspect.isclass(callback): cb_obj = callback() if not callable(cb_obj): raise ValueError( "Callback must be a class that implements __call__" " or a function." ) self._consumer_callback = cb_obj elif callable(callback): self._consumer_callback = callback else: raise ValueError( "Callback must be a class that implements __call__" " or a function." ) self._running = True self.connect() self._connection.ioloop.start()
python
def consume(self, callback, bindings=None, queues=None, exchanges=None): """ Consume messages from a message queue. Simply define a callable to be used as the callback when messages are delivered and specify the queue bindings. This call blocks. The callback signature should accept a single positional argument which is an instance of a :class:`Message` (or a sub-class of it). Args: callback (callable): The callable to pass the message to when one arrives. bindings (list of dict): A list of dictionaries describing bindings for queues. Refer to the :ref:`conf-bindings` configuration documentation for the format. queues (dict): A dictionary of queues to ensure exist. Refer to the :ref:`conf-queues` configuration documentation for the format. exchanges (dict): A dictionary of exchanges to ensure exist. Refer to the :ref:`conf-exchanges` configuration documentation for the format. Raises: HaltConsumer: Raised when the consumer halts. ValueError: If the callback isn't a callable object or a class with __call__ defined. """ self._bindings = bindings or config.conf["bindings"] self._queues = queues or config.conf["queues"] self._exchanges = exchanges or config.conf["exchanges"] # If the callback is a class, create an instance of it first if inspect.isclass(callback): cb_obj = callback() if not callable(cb_obj): raise ValueError( "Callback must be a class that implements __call__" " or a function." ) self._consumer_callback = cb_obj elif callable(callback): self._consumer_callback = callback else: raise ValueError( "Callback must be a class that implements __call__" " or a function." ) self._running = True self.connect() self._connection.ioloop.start()
[ "def", "consume", "(", "self", ",", "callback", ",", "bindings", "=", "None", ",", "queues", "=", "None", ",", "exchanges", "=", "None", ")", ":", "self", ".", "_bindings", "=", "bindings", "or", "config", ".", "conf", "[", "\"bindings\"", "]", "self", ".", "_queues", "=", "queues", "or", "config", ".", "conf", "[", "\"queues\"", "]", "self", ".", "_exchanges", "=", "exchanges", "or", "config", ".", "conf", "[", "\"exchanges\"", "]", "# If the callback is a class, create an instance of it first", "if", "inspect", ".", "isclass", "(", "callback", ")", ":", "cb_obj", "=", "callback", "(", ")", "if", "not", "callable", "(", "cb_obj", ")", ":", "raise", "ValueError", "(", "\"Callback must be a class that implements __call__\"", "\" or a function.\"", ")", "self", ".", "_consumer_callback", "=", "cb_obj", "elif", "callable", "(", "callback", ")", ":", "self", ".", "_consumer_callback", "=", "callback", "else", ":", "raise", "ValueError", "(", "\"Callback must be a class that implements __call__\"", "\" or a function.\"", ")", "self", ".", "_running", "=", "True", "self", ".", "connect", "(", ")", "self", ".", "_connection", ".", "ioloop", ".", "start", "(", ")" ]
Consume messages from a message queue. Simply define a callable to be used as the callback when messages are delivered and specify the queue bindings. This call blocks. The callback signature should accept a single positional argument which is an instance of a :class:`Message` (or a sub-class of it). Args: callback (callable): The callable to pass the message to when one arrives. bindings (list of dict): A list of dictionaries describing bindings for queues. Refer to the :ref:`conf-bindings` configuration documentation for the format. queues (dict): A dictionary of queues to ensure exist. Refer to the :ref:`conf-queues` configuration documentation for the format. exchanges (dict): A dictionary of exchanges to ensure exist. Refer to the :ref:`conf-exchanges` configuration documentation for the format. Raises: HaltConsumer: Raised when the consumer halts. ValueError: If the callback isn't a callable object or a class with __call__ defined.
[ "Consume", "messages", "from", "a", "message", "queue", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L466-L513
train
This method is used to consume messages from a message queue.
GiP5xwVCF98Z,B3LV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sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(50) + '\064' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10942 - 10831) + chr(0b1111 + 0o43) + '\067' + '\064', 0b1000), nzTpIcepk0o8(chr(904 - 856) + chr(0b1101111) + chr(49) + chr(0b100000 + 0o24) + '\x34', 16755 - 16747), nzTpIcepk0o8(chr(2138 - 2090) + chr(111) + '\x31' + '\062' + chr(1052 - 999), 64969 - 64961), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\060' + '\067', 24950 - 24942), nzTpIcepk0o8('\060' + '\x6f' + chr(901 - 852) + '\x31', 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b111000 + 0o67) + chr(0b110000 + 0o1) + '\060' + chr(298 - 248), 61034 - 61026), nzTpIcepk0o8(chr(48) + chr(2277 - 2166) + '\063' + chr(0b100010 + 0o23) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1011 + 0o50) + '\x30' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b101 + 0o55) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\x32' + chr(53), 16389 - 16381), nzTpIcepk0o8(chr(712 - 664) + '\x6f' + '\062' + chr(55) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(54) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(1792 - 1744) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11 + 0o154) + chr(0b101 + 0o54) + chr(0b110110) + chr(50), 0b1000), nzTpIcepk0o8(chr(2057 - 2009) + chr(111) + chr(49) + chr(50) + chr(316 - 266), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\x32' + chr(2311 - 2256), ord("\x08")), nzTpIcepk0o8(chr(2218 - 2170) + chr(0b1101111) + chr(50) + chr(55) + chr(2032 - 1981), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(1559 - 1504) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110111) + chr(1343 - 1290), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11101 + 0o25) + chr(0b110100) + chr(1798 - 1749), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(0b10001 + 0o41) + chr(767 - 716), 14763 - 14755), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2136 - 2085) + chr(1164 - 1112) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110110) + '\x30', 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(49) + '\060' + chr(1075 - 1022), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b110000) + chr(900 - 849), ord("\x08")), nzTpIcepk0o8(chr(1475 - 1427) + chr(11370 - 11259) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(525 - 414) + chr(0b100100 + 0o16) + chr(0b11100 + 0o25), 19084 - 19076), nzTpIcepk0o8(chr(48) + '\157' + chr(2155 - 2101) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(2153 - 2098) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(1921 - 1870) + chr(0b10110 + 0o34) + '\066', 57539 - 57531), nzTpIcepk0o8(chr(1172 - 1124) + chr(0b1101111) + '\x33' + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(1251 - 1140) + chr(457 - 407) + chr(0b111 + 0o52) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1810 - 1760) + chr(0b101010 + 0o10) + chr(2188 - 2134), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100011 + 0o17) + chr(0b11111 + 0o27), 21148 - 21140), nzTpIcepk0o8(chr(48) + chr(3038 - 2927) + chr(0b1010 + 0o51) + '\063', 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + chr(51) + chr(0b101111 + 0o1), 45331 - 45323), nzTpIcepk0o8(chr(260 - 212) + chr(111) + chr(0b110110) + '\065', 0o10), nzTpIcepk0o8(chr(618 - 570) + chr(111) + chr(0b110001) + '\x34' + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11101 + 0o26) + '\x30' + '\067', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1000 + 0o147) + chr(0b10010 + 0o43) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8c'), chr(0b1011010 + 0o12) + '\x65' + chr(3596 - 3497) + chr(0b1101111) + '\144' + '\x65')('\x75' + '\164' + chr(102) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def X3OqjwXXClZ4(hXMPsSrOQzbh, jG5KU4UUGnk5, Eov4xKwUG62w=None, NJajU877lUB0=None, j58eSDqO56RL=None): hXMPsSrOQzbh.FMX1t9ObHyrR = Eov4xKwUG62w or kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xc0\xd5\n1.g%\x99'), chr(0b1100100) + chr(0b1100101) + chr(2751 - 2652) + chr(0b110111 + 0o70) + '\144' + '\x65')(chr(7133 - 7016) + chr(0b1010010 + 0o42) + chr(102) + chr(439 - 394) + chr(2963 - 2907))] hXMPsSrOQzbh.fErNBXFrpU6e = NJajU877lUB0 or kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xd3\xc9\x01 "z'), chr(0b1100100) + '\x65' + chr(5217 - 5118) + chr(0b1101111) + '\x64' + '\145')(chr(6147 - 6030) + chr(116) + chr(102) + '\055' + '\070')] hXMPsSrOQzbh.Ypr2HT2PsS21 = j58eSDqO56RL or kgkKUcD36lls.aESS6GwxoZhA[roI3spqORKae(ES5oEprVxulp(b'\xc7\xc4\x07=&g%\x8f\xb7'), chr(5882 - 5782) + '\x65' + chr(0b1000100 + 0o37) + chr(0b1101111) + chr(7742 - 7642) + '\145')('\x75' + chr(0b100011 + 0o121) + '\x66' + chr(1048 - 1003) + '\070')] if roI3spqORKae(fqyA_Zm6qdLB, roI3spqORKae(ES5oEprVxulp(b'\xcb\xcf\x079&z1'), chr(9127 - 9027) + chr(0b11 + 0o142) + '\143' + chr(0b11110 + 0o121) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b10001 + 0o125) + chr(656 - 611) + '\070'))(jG5KU4UUGnk5): hE2gotJze9BH = jG5KU4UUGnk5() if not typojWN5Phrq(hE2gotJze9BH): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xe1\xdd\x089%h!\x81\xe4\xbe\xe0\xca\xc0\xa1\x107w\xda\x9a\x1e\xcdr\x95Ce\xf7kpCZ\xbfw\xfd\xfasv}[\x14\xb4\x82\xe3;6&e.\xb5\x9b\xf3\xfa\xcb\x94\xe0R4"\xd5\xd9\t\xc8|\x88\x1e'), chr(2954 - 2854) + chr(0b101000 + 0o75) + chr(0b1010111 + 0o14) + chr(0b10011 + 0o134) + chr(100) + '\145')('\165' + chr(116) + chr(0b1100110) + chr(0b10000 + 0o35) + chr(0b100100 + 0o24))) hXMPsSrOQzbh.Qhsc5SXnGQV3 = hE2gotJze9BH elif typojWN5Phrq(jG5KU4UUGnk5): hXMPsSrOQzbh.Qhsc5SXnGQV3 = jG5KU4UUGnk5 else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xe1\xdd\x089%h!\x81\xe4\xbe\xe0\xca\xc0\xa1\x107w\xda\x9a\x1e\xcdr\x95Ce\xf7kpCZ\xbfw\xfd\xfasv}[\x14\xb4\x82\xe3;6&e.\xb5\x9b\xf3\xfa\xcb\x94\xe0R4"\xd5\xd9\t\xc8|\x88\x1e'), chr(0b1100100) + chr(6920 - 6819) + chr(6643 - 6544) + chr(2634 - 2523) + chr(0b1011111 + 0o5) + chr(0b1011010 + 0o13))('\x75' + chr(0b1001 + 0o153) + '\146' + '\x2d' + chr(2103 - 2047))) hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(0b110000) + chr(0b110011 + 0o74) + '\x31', 0o10) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf0\x88\x0c \nz$\xa4\xbd\x8b\xc0\xd4'), '\144' + chr(0b11010 + 0o113) + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(6898 - 6781) + chr(116) + chr(0b110101 + 0o61) + chr(0b101101) + chr(0b111000)))() roI3spqORKae(hXMPsSrOQzbh._connection.ioloop, roI3spqORKae(ES5oEprVxulp(b'\xe9\xed\x06\x1d\x01]!\x86\x9b\x9f\xde\xc0'), chr(0b1100100) + '\145' + chr(99) + chr(8527 - 8416) + '\144' + chr(101))('\x75' + chr(11140 - 11024) + chr(0b110 + 0o140) + '\055' + chr(0b111000)))()
fedora-infra/fedora-messaging
fedora_messaging/_session.py
ConsumerSession._on_message
def _on_message(self, channel, delivery_frame, properties, body): """ Callback when a message is received from the server. This method wraps a user-registered callback for message delivery. It decodes the message body, determines the message schema to validate the message with, and validates the message before passing it on to the user callback. This also handles acking, nacking, and rejecting messages based on exceptions raised by the consumer callback. For detailed documentation on the user-provided callback, see the user guide on consuming. Args: channel (pika.channel.Channel): The channel from which the message was received. delivery_frame (pika.spec.Deliver): The delivery frame which includes details about the message like content encoding and its delivery tag. properties (pika.spec.BasicProperties): The message properties like the message headers. body (bytes): The message payload. Raises: HaltConsumer: Raised when the consumer halts. """ _log.debug("Message arrived with delivery tag %s", delivery_frame.delivery_tag) try: message = get_message(delivery_frame.routing_key, properties, body) message.queue = self._consumers[delivery_frame.consumer_tag] except ValidationError: channel.basic_nack(delivery_tag=delivery_frame.delivery_tag, requeue=False) return try: _log.info( 'Consuming message from topic "%s" (id %s)', message.topic, properties.message_id, ) self._consumer_callback(message) channel.basic_ack(delivery_tag=delivery_frame.delivery_tag) except Nack: _log.info("Returning message id %s to the queue", properties.message_id) channel.basic_nack(delivery_tag=delivery_frame.delivery_tag, requeue=True) except Drop: _log.info("Dropping message id %s", properties.message_id) channel.basic_nack(delivery_tag=delivery_frame.delivery_tag, requeue=False) except HaltConsumer as e: _log.info( "Consumer requested halt on message id %s with requeue=%s", properties.message_id, e.requeue, ) channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=e.requeue ) self._shutdown() if e.exit_code != 0: raise except Exception as e: _log.exception("Received unexpected exception from consumer callback") channel.basic_nack(delivery_tag=0, multiple=True, requeue=True) self._shutdown() raise HaltConsumer(exit_code=1, reason=e, requeue=True)
python
def _on_message(self, channel, delivery_frame, properties, body): """ Callback when a message is received from the server. This method wraps a user-registered callback for message delivery. It decodes the message body, determines the message schema to validate the message with, and validates the message before passing it on to the user callback. This also handles acking, nacking, and rejecting messages based on exceptions raised by the consumer callback. For detailed documentation on the user-provided callback, see the user guide on consuming. Args: channel (pika.channel.Channel): The channel from which the message was received. delivery_frame (pika.spec.Deliver): The delivery frame which includes details about the message like content encoding and its delivery tag. properties (pika.spec.BasicProperties): The message properties like the message headers. body (bytes): The message payload. Raises: HaltConsumer: Raised when the consumer halts. """ _log.debug("Message arrived with delivery tag %s", delivery_frame.delivery_tag) try: message = get_message(delivery_frame.routing_key, properties, body) message.queue = self._consumers[delivery_frame.consumer_tag] except ValidationError: channel.basic_nack(delivery_tag=delivery_frame.delivery_tag, requeue=False) return try: _log.info( 'Consuming message from topic "%s" (id %s)', message.topic, properties.message_id, ) self._consumer_callback(message) channel.basic_ack(delivery_tag=delivery_frame.delivery_tag) except Nack: _log.info("Returning message id %s to the queue", properties.message_id) channel.basic_nack(delivery_tag=delivery_frame.delivery_tag, requeue=True) except Drop: _log.info("Dropping message id %s", properties.message_id) channel.basic_nack(delivery_tag=delivery_frame.delivery_tag, requeue=False) except HaltConsumer as e: _log.info( "Consumer requested halt on message id %s with requeue=%s", properties.message_id, e.requeue, ) channel.basic_nack( delivery_tag=delivery_frame.delivery_tag, requeue=e.requeue ) self._shutdown() if e.exit_code != 0: raise except Exception as e: _log.exception("Received unexpected exception from consumer callback") channel.basic_nack(delivery_tag=0, multiple=True, requeue=True) self._shutdown() raise HaltConsumer(exit_code=1, reason=e, requeue=True)
[ "def", "_on_message", "(", "self", ",", "channel", ",", "delivery_frame", ",", "properties", ",", "body", ")", ":", "_log", ".", "debug", "(", "\"Message arrived with delivery tag %s\"", ",", "delivery_frame", ".", "delivery_tag", ")", "try", ":", "message", "=", "get_message", "(", "delivery_frame", ".", "routing_key", ",", "properties", ",", "body", ")", "message", ".", "queue", "=", "self", ".", "_consumers", "[", "delivery_frame", ".", "consumer_tag", "]", "except", "ValidationError", ":", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "False", ")", "return", "try", ":", "_log", ".", "info", "(", "'Consuming message from topic \"%s\" (id %s)'", ",", "message", ".", "topic", ",", "properties", ".", "message_id", ",", ")", "self", ".", "_consumer_callback", "(", "message", ")", "channel", ".", "basic_ack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ")", "except", "Nack", ":", "_log", ".", "info", "(", "\"Returning message id %s to the queue\"", ",", "properties", ".", "message_id", ")", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "True", ")", "except", "Drop", ":", "_log", ".", "info", "(", "\"Dropping message id %s\"", ",", "properties", ".", "message_id", ")", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "False", ")", "except", "HaltConsumer", "as", "e", ":", "_log", ".", "info", "(", "\"Consumer requested halt on message id %s with requeue=%s\"", ",", "properties", ".", "message_id", ",", "e", ".", "requeue", ",", ")", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "delivery_frame", ".", "delivery_tag", ",", "requeue", "=", "e", ".", "requeue", ")", "self", ".", "_shutdown", "(", ")", "if", "e", ".", "exit_code", "!=", "0", ":", "raise", "except", "Exception", "as", "e", ":", "_log", ".", "exception", "(", "\"Received unexpected exception from consumer callback\"", ")", "channel", ".", "basic_nack", "(", "delivery_tag", "=", "0", ",", "multiple", "=", "True", ",", "requeue", "=", "True", ")", "self", ".", "_shutdown", "(", ")", "raise", "HaltConsumer", "(", "exit_code", "=", "1", ",", "reason", "=", "e", ",", "requeue", "=", "True", ")" ]
Callback when a message is received from the server. This method wraps a user-registered callback for message delivery. It decodes the message body, determines the message schema to validate the message with, and validates the message before passing it on to the user callback. This also handles acking, nacking, and rejecting messages based on exceptions raised by the consumer callback. For detailed documentation on the user-provided callback, see the user guide on consuming. Args: channel (pika.channel.Channel): The channel from which the message was received. delivery_frame (pika.spec.Deliver): The delivery frame which includes details about the message like content encoding and its delivery tag. properties (pika.spec.BasicProperties): The message properties like the message headers. body (bytes): The message payload. Raises: HaltConsumer: Raised when the consumer halts.
[ "Callback", "when", "a", "message", "is", "received", "from", "the", "server", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/fedora_messaging/_session.py#L515-L580
train
Callback for receiving a message from the server.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlC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,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1455 - 1407) + chr(111) + chr(49) + '\062' + chr(2151 - 2103), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b11010 + 0o30) + chr(0b1000 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b110011) + '\x33' + '\x34', 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b101011 + 0o6) + chr(0b110111) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\x31' + chr(0b100101 + 0o14) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110111) + chr(0b100001 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7964 - 7853) + chr(0b100101 + 0o15) + '\064' + chr(54), 0o10), nzTpIcepk0o8('\x30' + chr(0b100111 + 0o110) + '\x36' + '\067', 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + '\063' + '\064' + chr(853 - 800), 4928 - 4920), nzTpIcepk0o8('\060' + '\157' + '\066' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(2333 - 2222) + chr(0b110010) + chr(2177 - 2127) + '\064', 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(10082 - 9971) + '\x32' + '\x36' + '\x35', 19375 - 19367), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1941 - 1891) + chr(53) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b110111) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + chr(0b11110 + 0o23) + '\062', 49228 - 49220), nzTpIcepk0o8('\x30' + chr(8521 - 8410) + chr(51) + '\x36' + chr(0b10000 + 0o43), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11110 + 0o24) + chr(49) + chr(0b110100), 41133 - 41125), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\067' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b110111 + 0o70) + '\061' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\065' + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(443 - 395) + '\062', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + chr(2762 - 2707), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b11100 + 0o33) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010 + 0o1) + chr(0b110010) + chr(2757 - 2704), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(53) + '\x34', 0b1000), nzTpIcepk0o8(chr(1931 - 1883) + chr(0b111000 + 0o67) + '\x32' + chr(0b101 + 0o55) + chr(0b10110 + 0o32), 1057 - 1049), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100010 + 0o21) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(55) + chr(1670 - 1619), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(611 - 557), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\063' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(111) + '\x33' + chr(904 - 855) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(4788 - 4677) + chr(0b110001) + chr(963 - 911) + chr(0b1100 + 0o50), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b110000) + chr(54), 59421 - 59413), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101011 + 0o4) + chr(0b1010 + 0o51) + '\x31' + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(167 - 117) + chr(0b100101 + 0o21) + '\x34', 7918 - 7910), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(48) + chr(54), 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b110011) + chr(0b110000) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + '\066' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101010 + 0o5) + chr(0b0 + 0o63) + chr(49) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(10858 - 10747) + chr(1665 - 1614) + '\063' + chr(55), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'~'), chr(4436 - 4336) + '\x65' + '\x63' + chr(282 - 171) + '\144' + chr(1643 - 1542))(chr(117) + chr(116) + '\146' + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def M9fgWFBTjSsr(hXMPsSrOQzbh, qiE6ZboUDe50, MiCxR_ginZ7Z, UtZvTnutzMHg, ryRPGaxqs24n): roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'7\x91\xe5 v\x9b\xc9\x01\xb0]\xd1\xef'), chr(9825 - 9725) + chr(0b1000011 + 0o42) + chr(0b1100011) + '\157' + chr(0b100100 + 0o100) + chr(0b1100000 + 0o5))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x1d\xb5\xaf\t.\x98\xc3\x17\x84B\xe6\xdc\xde\xdbn\xd3\xfb\x97}\xc7\xa2K\x9c\xb9E\xe6z\x89w\xb9\xb9\x05\xe1\xea\x91\xf5'), '\144' + '\145' + '\x63' + '\157' + '\x64' + chr(0b1010111 + 0o16))(chr(0b101010 + 0o113) + chr(116) + chr(102) + chr(45) + '\x38'), roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'9\x85\x8dK<\xb7\x97\x05\x8f\x06\xf2\x86'), chr(100) + '\x65' + chr(0b1100011) + chr(10958 - 10847) + chr(0b1100100) + chr(101))(chr(0b1010000 + 0o45) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)))) try: FksNMH1w_ns6 = KB3qSwugcArA(MiCxR_ginZ7Z.routing_key, UtZvTnutzMHg, ryRPGaxqs24n) FksNMH1w_ns6.iRcFmb17G7aY = hXMPsSrOQzbh.iv39oDB3x3mc[MiCxR_ginZ7Z.consumer_tag] except NvSA9vIojSzD: roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'2\xb1\xaf\x13,\xa0\xc8V\x86['), '\144' + chr(101) + chr(0b10 + 0o141) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(950 - 848) + '\x2d' + chr(56)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'9\x85\x8dK<\xb7\x97\x05\x8f\x06\xf2\x86'), '\144' + chr(2748 - 2647) + chr(0b1100011) + chr(0b1101111) + '\144' + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(45) + chr(0b11010 + 0o36))), requeue=nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + chr(0b110000), 0b1000)) return try: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'9\xa8\x92\x02v\xb3\xd1h\xd4W\xe6\xfa'), '\x64' + chr(7023 - 6922) + '\x63' + '\157' + chr(0b1100100) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(0b100001 + 0o14) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x13\xbf\xb2\t:\x92\xcfY\x82\x10\xf9\xd0\xdb\xcdk\x94\xe9\xdeo\xdd\xedB\xd9\xa1C\xe0v\x98.\xbb\xe8\x17\xa4\xea\x9c\xef\xa3\x15\xed\xacy'), '\144' + chr(101) + '\x63' + '\157' + chr(0b100110 + 0o76) + chr(2963 - 2862))('\165' + '\x74' + chr(102) + chr(0b101101) + chr(0b111000 + 0o0)), roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'5\xb4\xb8>\t\xb0\xe3q\x9c\x02\xf0\xfd'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101000 + 0o7) + chr(8908 - 8808) + chr(2452 - 2351))(chr(0b1000010 + 0o63) + '\x74' + '\146' + '\055' + chr(2767 - 2711))), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'=\xb5\xaf\t.\x98\xc3h\x8cT'), chr(0b1010100 + 0o20) + chr(0b1001011 + 0o32) + '\x63' + chr(0b11101 + 0o122) + chr(100) + chr(0b101000 + 0o75))('\x75' + '\x74' + '\x66' + chr(45) + chr(0b101000 + 0o20)))) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x01\xb8\xaf\x19z\xac\xfeY\xa2a\xc2\x86'), '\x64' + chr(0b1100101) + '\143' + chr(0b1101111) + '\144' + '\x65')(chr(9518 - 9401) + '\x74' + chr(0b1100110) + chr(752 - 707) + '\x38'))(FksNMH1w_ns6) roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'2\xb1\xaf\x13,\xa0\xc7T\x8e'), '\144' + chr(101) + chr(0b110001 + 0o62) + '\x6f' + chr(0b110100 + 0o60) + chr(0b1100101))(chr(117) + '\x74' + chr(475 - 373) + '\055' + chr(0b110000 + 0o10)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'9\x85\x8dK<\xb7\x97\x05\x8f\x06\xf2\x86'), '\x64' + '\145' + '\143' + '\x6f' + '\144' + '\145')(chr(4360 - 4243) + '\164' + '\x66' + chr(45) + chr(0b111 + 0o61)))) except RRYFQBQwTJsn: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'9\xa8\x92\x02v\xb3\xd1h\xd4W\xe6\xfa'), chr(2370 - 2270) + '\145' + '\x63' + '\157' + '\x64' + '\145')('\165' + chr(116) + '\x66' + '\x2d' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x02\xb5\xa8\x0f=\x91\xcfY\x82\x10\xf9\xd0\xdb\xcdk\x94\xe9\xde`\xcb\xa2\n\x8a\xf5X\xff?\x8ff\xfc\xed\x15\xf3\xaf\xc1\xe3'), chr(0b100011 + 0o101) + '\x65' + chr(3374 - 3275) + '\157' + '\x64' + chr(101))('\165' + chr(0b1011110 + 0o26) + chr(102) + '\055' + chr(0b111000)), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'=\xb5\xaf\t.\x98\xc3h\x8cT'), chr(100) + chr(101) + chr(0b11100 + 0o107) + chr(111) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(8962 - 8860) + chr(0b101101) + chr(402 - 346)))) roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'2\xb1\xaf\x13,\xa0\xc8V\x86['), chr(979 - 879) + chr(0b1011011 + 0o12) + '\x63' + chr(0b1001101 + 0o42) + '\x64' + '\x65')(chr(9126 - 9009) + '\x74' + '\146' + chr(0b101101) + chr(0b110111 + 0o1)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'9\x85\x8dK<\xb7\x97\x05\x8f\x06\xf2\x86'), '\x64' + chr(0b1100101) + chr(0b1000101 + 0o36) + chr(6168 - 6057) + '\x64' + '\145')('\165' + '\164' + chr(102) + chr(1754 - 1709) + '\070')), requeue=nzTpIcepk0o8(chr(0b110000) + '\157' + '\061', 0b1000)) except RkldlnaoMWPV: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'9\xa8\x92\x02v\xb3\xd1h\xd4W\xe6\xfa'), chr(100) + chr(0b11100 + 0o111) + chr(99) + chr(9392 - 9281) + chr(2751 - 2651) + '\145')(chr(13637 - 13520) + chr(5104 - 4988) + '\146' + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x14\xa2\xb3\n?\x96\xc8P\xc5]\xf1\xc6\xdb\xdfm\x96\xac\x97m\x8f\xa7\\'), chr(100) + chr(101) + chr(0b111 + 0o134) + chr(6026 - 5915) + '\x64' + chr(101))(chr(117) + '\x74' + chr(0b1100110) + chr(45) + chr(0b1100 + 0o54)), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'=\xb5\xaf\t.\x98\xc3h\x8cT'), chr(3968 - 3868) + '\x65' + chr(0b101110 + 0o65) + '\157' + '\x64' + '\x65')(chr(0b100011 + 0o122) + chr(6082 - 5966) + chr(0b1100110) + '\055' + chr(0b111000)))) roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'2\xb1\xaf\x13,\xa0\xc8V\x86['), chr(0b1011100 + 0o10) + chr(2968 - 2867) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(117) + '\x74' + chr(4951 - 4849) + '\x2d' + chr(56)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'9\x85\x8dK<\xb7\x97\x05\x8f\x06\xf2\x86'), chr(0b101100 + 0o70) + chr(2227 - 2126) + chr(0b1010100 + 0o17) + chr(0b1101111) + chr(6488 - 6388) + chr(0b1100101))(chr(117) + chr(9947 - 9831) + chr(0b1001111 + 0o27) + chr(115 - 70) + chr(1101 - 1045))), requeue=nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(48), 8)) except Mu3Zfzebdly9 as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'9\xa8\x92\x02v\xb3\xd1h\xd4W\xe6\xfa'), chr(0b1001 + 0o133) + chr(8240 - 8139) + chr(0b101010 + 0o71) + chr(0b1001110 + 0o41) + chr(0b110110 + 0o56) + '\145')('\165' + chr(0b1110100) + '\146' + '\055' + chr(1842 - 1786)))(roI3spqORKae(ES5oEprVxulp(b"\x13\xbf\xb2\t:\x92\xc3E\xc5B\xf1\xc4\xdd\xdby\x87\xe9\x9a)\xc7\xe3C\x8d\xf5C\xfe?\x96k\xea\xbe\x05\xe1\xaf\x94\xef\xa3\x15\xed\xacp\xa7\xb5\x0e'\xdf\xd4R\x94E\xf1\xc0\xcd\x83/\x80"), chr(0b110110 + 0o56) + chr(0b1100011 + 0o2) + '\143' + chr(0b1101111) + chr(7544 - 7444) + chr(101))(chr(0b111001 + 0o74) + chr(116) + chr(0b1100110) + chr(0b10100 + 0o31) + chr(56)), roI3spqORKae(UtZvTnutzMHg, roI3spqORKae(ES5oEprVxulp(b'=\xb5\xaf\t.\x98\xc3h\x8cT'), chr(0b10100 + 0o120) + chr(0b1100101) + chr(0b1010001 + 0o22) + chr(3601 - 3490) + chr(0b1100100) + '\x65')('\165' + chr(5938 - 5822) + '\x66' + chr(0b11 + 0o52) + chr(2243 - 2187))), roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'"\xb5\xad\x0f*\x8a\xc3'), chr(0b1100100) + chr(0b1100101) + chr(7771 - 7672) + '\x6f' + chr(9333 - 9233) + '\x65')(chr(117) + chr(0b111100 + 0o70) + chr(0b1100110) + chr(775 - 730) + chr(56)))) roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'2\xb1\xaf\x13,\xa0\xc8V\x86['), '\144' + chr(0b10010 + 0o123) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(0b1000101 + 0o41) + '\x2d' + chr(0b111000 + 0o0)))(delivery_tag=roI3spqORKae(MiCxR_ginZ7Z, roI3spqORKae(ES5oEprVxulp(b'9\x85\x8dK<\xb7\x97\x05\x8f\x06\xf2\x86'), '\144' + chr(0b1100101) + chr(0b1010010 + 0o21) + chr(5388 - 5277) + chr(0b11000 + 0o114) + '\145')(chr(7552 - 7435) + chr(116) + '\x66' + chr(0b101101) + chr(553 - 497))), requeue=roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'"\xb5\xad\x0f*\x8a\xc3'), chr(8281 - 8181) + chr(0b111110 + 0o47) + chr(2896 - 2797) + '\x6f' + chr(100) + chr(0b1100101))(chr(117) + chr(4910 - 4794) + chr(7788 - 7686) + chr(547 - 502) + chr(56)))) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b' \xb6\xee\x18\x05\xbe\xec@\xbd\x00\xc6\xf6'), chr(0b101010 + 0o72) + '\145' + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(3434 - 3317) + chr(0b1001000 + 0o54) + '\146' + chr(45) + chr(56)))() if roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'\x06\x95\xba\x0c#\x9c\x93M\xbfu\xf2\xd7'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + '\x64' + chr(0b1010 + 0o133))('\165' + chr(7562 - 7446) + '\146' + '\055' + chr(0b111000))) != nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 8): raise except zfo2Sgkz3IVJ as wgf0sgcu_xPL: roI3spqORKae(vnyQSo3tqW2h, roI3spqORKae(ES5oEprVxulp(b'"\xb3\x90\x1b\x05\x9d\xc5}\xa8S\xda\xc3'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(1768 - 1668) + '\x65')(chr(0b1110101) + chr(0b1100 + 0o150) + chr(0b1100110) + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x02\xb5\xbf\x1f&\x89\xc3S\xc5E\xfa\xd0\xd0\xceo\x90\xf8\x9bm\x8f\xe7W\x9a\xb0\\\xe4v\x94`\xb9\xab\x16\xe9\xa7\x94\xe5\xa8[\xbb\xaa=\xb5\xaeZ,\x9e\xca[\x87Q\xf7\xde'), '\x64' + '\x65' + chr(0b11000 + 0o113) + '\x6f' + '\x64' + chr(101))(chr(1634 - 1517) + chr(0b1110100) + chr(7976 - 7874) + chr(0b101101 + 0o0) + chr(0b1010 + 0o56))) roI3spqORKae(qiE6ZboUDe50, roI3spqORKae(ES5oEprVxulp(b'2\xb1\xaf\x13,\xa0\xc8V\x86['), chr(0b1100010 + 0o2) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(0b1100000 + 0o24) + '\146' + '\055' + chr(0b100111 + 0o21)))(delivery_tag=nzTpIcepk0o8('\060' + chr(111) + chr(0b101101 + 0o3), 8), multiple=nzTpIcepk0o8('\060' + '\x6f' + chr(133 - 84), 8), requeue=nzTpIcepk0o8(chr(104 - 56) + chr(111) + chr(0b1100 + 0o45), 8)) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b' \xb6\xee\x18\x05\xbe\xec@\xbd\x00\xc6\xf6'), '\x64' + chr(0b1100101) + '\143' + '\x6f' + chr(3269 - 3169) + '\145')(chr(705 - 588) + chr(0b1110100) + chr(0b110000 + 0o66) + chr(0b101101) + chr(56)))() raise Mu3Zfzebdly9(exit_code=nzTpIcepk0o8(chr(942 - 894) + '\157' + chr(2164 - 2115), 8), reason=wgf0sgcu_xPL, requeue=nzTpIcepk0o8('\060' + chr(0b1101111) + '\061', 8))
fedora-infra/fedora-messaging
docs/sample_schema_package/mailman_schema/utils.py
get_avatar
def get_avatar(from_header, size=64, default="retro"): """Get the avatar URL from the email's From header. Args: from_header (str): The email's From header. May contain the sender's full name. Returns: str: The URL to that sender's avatar. """ params = OrderedDict([("s", size), ("d", default)]) query = parse.urlencode(params) address = email.utils.parseaddr(from_header)[1] value_hash = sha256(address.encode("utf-8")).hexdigest() return "https://seccdn.libravatar.org/avatar/{}?{}".format(value_hash, query)
python
def get_avatar(from_header, size=64, default="retro"): """Get the avatar URL from the email's From header. Args: from_header (str): The email's From header. May contain the sender's full name. Returns: str: The URL to that sender's avatar. """ params = OrderedDict([("s", size), ("d", default)]) query = parse.urlencode(params) address = email.utils.parseaddr(from_header)[1] value_hash = sha256(address.encode("utf-8")).hexdigest() return "https://seccdn.libravatar.org/avatar/{}?{}".format(value_hash, query)
[ "def", "get_avatar", "(", "from_header", ",", "size", "=", "64", ",", "default", "=", "\"retro\"", ")", ":", "params", "=", "OrderedDict", "(", "[", "(", "\"s\"", ",", "size", ")", ",", "(", "\"d\"", ",", "default", ")", "]", ")", "query", "=", "parse", ".", "urlencode", "(", "params", ")", "address", "=", "email", ".", "utils", ".", "parseaddr", "(", "from_header", ")", "[", "1", "]", "value_hash", "=", "sha256", "(", "address", ".", "encode", "(", "\"utf-8\"", ")", ")", ".", "hexdigest", "(", ")", "return", "\"https://seccdn.libravatar.org/avatar/{}?{}\"", ".", "format", "(", "value_hash", ",", "query", ")" ]
Get the avatar URL from the email's From header. Args: from_header (str): The email's From header. May contain the sender's full name. Returns: str: The URL to that sender's avatar.
[ "Get", "the", "avatar", "URL", "from", "the", "email", "s", "From", "header", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/docs/sample_schema_package/mailman_schema/utils.py#L25-L38
train
Get the avatar URL from the email s From header.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzo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,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110111) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10000 + 0o137) + chr(315 - 266) + chr(0b110111 + 0o0), 62149 - 62141), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(53) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(1826 - 1778) + chr(9924 - 9813) + chr(49) + '\x30' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b0 + 0o61) + chr(53) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(3903 - 3792) + '\x33' + '\x33' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1908 - 1860) + '\x6f' + '\x32' + chr(53) + chr(0b1001 + 0o51), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101011 + 0o10) + chr(0b110111) + chr(0b11001 + 0o36), 25166 - 25158), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110110) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + chr(49) + chr(0b101 + 0o56) + chr(54), 0b1000), nzTpIcepk0o8(chr(1596 - 1548) + '\x6f' + '\062' + chr(367 - 313) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\x30' + chr(0b1011 + 0o51), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(51) + chr(2811 - 2757) + '\x31', 51308 - 51300), nzTpIcepk0o8(chr(48) + chr(0b11000 + 0o127) + chr(0b110111) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b11010 + 0o125) + '\x33' + '\x32' + '\065', ord("\x08")), nzTpIcepk0o8(chr(1179 - 1131) + chr(0b1101111) + '\061' + chr(53) + chr(0b11000 + 0o30), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10100 + 0o43) + '\063', 45548 - 45540), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\x37' + '\x36', 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + '\x33' + '\x35' + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110111) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101101 + 0o5) + chr(254 - 203) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(1160 - 1110) + '\x30' + '\060', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b11011 + 0o34) + '\x30', 51343 - 51335), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(52) + chr(0b101100 + 0o6), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2479 - 2428) + chr(0b110101) + '\062', ord("\x08")), nzTpIcepk0o8(chr(1133 - 1085) + chr(0b1101111) + chr(49) + '\062' + chr(51), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(50), 12861 - 12853), nzTpIcepk0o8(chr(0b110000) + chr(0b1011101 + 0o22) + chr(0b10001 + 0o43) + '\065', 47229 - 47221), nzTpIcepk0o8(chr(48) + chr(7066 - 6955) + '\x33' + '\060' + '\064', 0b1000), nzTpIcepk0o8(chr(392 - 344) + chr(0b1010110 + 0o31) + chr(0b110001) + '\x32' + chr(1110 - 1058), 7110 - 7102), nzTpIcepk0o8(chr(370 - 322) + chr(3929 - 3818) + chr(55) + chr(384 - 330), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(50) + chr(1759 - 1704), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + '\062' + '\x30' + chr(0b110000), 8), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + chr(0b10110 + 0o33) + chr(55) + chr(1558 - 1506), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(49) + chr(205 - 152), 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + '\061' + chr(0b1 + 0o63) + chr(184 - 131), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11001 + 0o31) + '\067' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(151 - 102) + '\x35', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(0b110101) + chr(0b110000), 26438 - 26430)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b':'), chr(100) + chr(0b1100101) + '\x63' + '\157' + chr(3353 - 3253) + chr(0b101000 + 0o75))(chr(0b1011000 + 0o35) + chr(0b1010101 + 0o37) + chr(0b1100110 + 0o0) + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qPKOqoUOOyW1(XAwJPnLvbg3p, e1HrJaQHACnl=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1711 - 1662) + '\x30' + chr(48), 0o10), WmRBchRTeaDt=roI3spqORKae(ES5oEprVxulp(b'f\x19{\xde('), chr(6019 - 5919) + chr(0b11011 + 0o112) + chr(99) + chr(111) + chr(4924 - 4824) + chr(5019 - 4918))('\165' + '\164' + chr(102) + chr(0b10110 + 0o27) + '\x38')): GVgFAYMz7Sw8 = Ov4KLivfl4p6([(roI3spqORKae(ES5oEprVxulp(b'g'), '\x64' + chr(0b11001 + 0o114) + chr(0b1100011) + chr(111) + chr(1796 - 1696) + chr(101))('\165' + chr(0b1100111 + 0o15) + chr(0b1 + 0o145) + chr(45) + chr(951 - 895)), e1HrJaQHACnl), (roI3spqORKae(ES5oEprVxulp(b'p'), '\x64' + chr(0b101010 + 0o73) + '\x63' + chr(0b1011 + 0o144) + '\144' + chr(101))(chr(11408 - 11291) + '\164' + chr(0b1100110) + chr(551 - 506) + '\x38'), WmRBchRTeaDt)]) wKKXKFBlqW0G = zgDfHOdKcvCW.urlencode(GVgFAYMz7Sw8) en8jF5h3sD4W = BhwKvDaXtiJh.utils.parseaddr(XAwJPnLvbg3p)[nzTpIcepk0o8(chr(48) + '\x6f' + '\061', 19282 - 19274)] zcMIGkKNTLT8 = QJhbJ_Vslkwi(en8jF5h3sD4W.encode(roI3spqORKae(ES5oEprVxulp(b'a\x08i\x81\x7f'), chr(351 - 251) + chr(0b11111 + 0o106) + '\x63' + '\157' + '\x64' + chr(0b110100 + 0o61))(chr(0b1110101) + chr(12058 - 11942) + chr(0b101100 + 0o72) + chr(0b100101 + 0o10) + '\070'))).QJ_O92NaVG5k() return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'|\x08{\xdc4W\xf5\x85\x8c\x10=\xd7 \x9f\x16\xb9\x01Y\xcc\x88\x88\xfbn\xe1\x8a\x8c\x85!e\n\xa5"_#\xe1\x0e\xe2\x1e\xc02o\x01'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\157' + '\144' + '\145')(chr(117) + '\x74' + chr(0b1101 + 0o131) + chr(982 - 937) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'eO<\xe7\x00^\xbc\xc5\xae*\x1d\xfe'), chr(6927 - 6827) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100011 + 0o2))(chr(117) + chr(5105 - 4989) + chr(9457 - 9355) + chr(0b10001 + 0o34) + chr(0b111000)))(zcMIGkKNTLT8, wKKXKFBlqW0G)
fedora-infra/fedora-messaging
docs/sample_schema_package/mailman_schema/schema.py
BaseMessage.url
def url(self): """An URL to the email in HyperKitty Returns: str or None: A relevant URL. """ base_url = "https://lists.fedoraproject.org/archives" archived_at = self._get_archived_at() if archived_at and archived_at.startswith("<"): archived_at = archived_at[1:] if archived_at and archived_at.endswith(">"): archived_at = archived_at[:-1] if archived_at and archived_at.startswith("http"): return archived_at elif archived_at: return base_url + archived_at else: return None
python
def url(self): """An URL to the email in HyperKitty Returns: str or None: A relevant URL. """ base_url = "https://lists.fedoraproject.org/archives" archived_at = self._get_archived_at() if archived_at and archived_at.startswith("<"): archived_at = archived_at[1:] if archived_at and archived_at.endswith(">"): archived_at = archived_at[:-1] if archived_at and archived_at.startswith("http"): return archived_at elif archived_at: return base_url + archived_at else: return None
[ "def", "url", "(", "self", ")", ":", "base_url", "=", "\"https://lists.fedoraproject.org/archives\"", "archived_at", "=", "self", ".", "_get_archived_at", "(", ")", "if", "archived_at", "and", "archived_at", ".", "startswith", "(", "\"<\"", ")", ":", "archived_at", "=", "archived_at", "[", "1", ":", "]", "if", "archived_at", "and", "archived_at", ".", "endswith", "(", "\">\"", ")", ":", "archived_at", "=", "archived_at", "[", ":", "-", "1", "]", "if", "archived_at", "and", "archived_at", ".", "startswith", "(", "\"http\"", ")", ":", "return", "archived_at", "elif", "archived_at", ":", "return", "base_url", "+", "archived_at", "else", ":", "return", "None" ]
An URL to the email in HyperKitty Returns: str or None: A relevant URL.
[ "An", "URL", "to", "the", "email", "in", "HyperKitty" ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/docs/sample_schema_package/mailman_schema/schema.py#L52-L69
train
An URL to the email in HyperKitty.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFl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TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b10 + 0o57) + chr(0b1101 + 0o52) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(0b110011) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110000 + 0o3) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(5367 - 5256) + chr(0b110001) + '\x34' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(2356 - 2307) + chr(50), 1306 - 1298), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(1211 - 1161) + '\x33' + chr(0b1 + 0o64), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(4415 - 4304) + chr(0b110001) + chr(236 - 185) + '\065', 0b1000), nzTpIcepk0o8(chr(2052 - 2004) + chr(0b110111 + 0o70) + chr(0b110001) + '\x32' + chr(49), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(0b110100) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(439 - 390) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(2244 - 2191), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5228 - 5117) + chr(0b100101 + 0o15) + chr(50) + chr(48), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b10 + 0o155) + '\x31' + chr(53) + chr(0b10111 + 0o37), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\x33' + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110000 + 0o1) + '\065' + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x37' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(713 - 665) + chr(0b11011 + 0o124) + chr(51) + chr(1173 - 1118) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(50) + chr(180 - 126), 0b1000), nzTpIcepk0o8(chr(94 - 46) + chr(111) + chr(721 - 672) + chr(2125 - 2073) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(0b100000 + 0o22) + '\x36' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111001 + 0o66) + chr(0b10011 + 0o36) + chr(0b110001) + chr(1383 - 1333), 50254 - 50246), nzTpIcepk0o8('\060' + '\157' + chr(0b11111 + 0o24) + '\064' + chr(0b110110 + 0o1), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1010111 + 0o30) + chr(0b101001 + 0o10) + '\067' + '\066', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(587 - 538) + '\061' + chr(0b110010), 8), nzTpIcepk0o8('\x30' + chr(8664 - 8553) + chr(50) + chr(51) + '\067', 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b101001 + 0o106) + '\x32' + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8(chr(120 - 72) + chr(7914 - 7803) + '\x31' + '\x31' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011001 + 0o26) + '\063' + '\x37' + chr(675 - 627), ord("\x08")), nzTpIcepk0o8(chr(83 - 35) + '\x6f' + '\x32' + chr(0b101110 + 0o11), 0o10), nzTpIcepk0o8(chr(689 - 641) + chr(0b1101111) + chr(1764 - 1713) + chr(1467 - 1412) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(0b110011) + '\063' + chr(0b101001 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(859 - 811) + '\x6f' + chr(284 - 231) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\066' + chr(0b1100 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\065' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\x37' + chr(1259 - 1207), 44121 - 44113), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1154 - 1104) + chr(1063 - 1009) + '\067', 0o10), nzTpIcepk0o8(chr(708 - 660) + chr(111) + chr(51) + '\x36' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5049 - 4938) + '\x31' + '\064' + chr(55), 29018 - 29010), nzTpIcepk0o8('\060' + chr(0b101 + 0o152) + chr(1298 - 1247) + '\067' + chr(50), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1000 + 0o55) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'W'), '\144' + '\x65' + chr(4856 - 4757) + chr(0b0 + 0o157) + chr(4509 - 4409) + chr(9118 - 9017))(chr(0b111110 + 0o67) + '\x74' + '\146' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def XuBkOpBKZJ5Z(hXMPsSrOQzbh): ncb6gPauwqn0 = roI3spqORKae(ES5oEprVxulp(b'\x11,+\x11\xf9\xa7r~Jgf\xe4\x1d\x05\xfa\x0f^\x95d\x03\xc08\x88\x14/\xfc\xd9a\x97e\x9e\xf5MF\x0b\x94\xde\x83\x02\x89'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))('\165' + chr(116) + chr(6085 - 5983) + '\x2d' + chr(0b0 + 0o70)) SSiTTShKWDnT = hXMPsSrOQzbh._get_archived_at() if SSiTTShKWDnT and roI3spqORKae(SSiTTShKWDnT, roI3spqORKae(ES5oEprVxulp(b'\n,>\x13\xfe\xee*8Rf'), chr(0b1011101 + 0o7) + chr(7548 - 7447) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(0b100110 + 0o116) + chr(8654 - 8552) + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'E'), '\x64' + chr(0b1011001 + 0o14) + chr(690 - 591) + '\157' + chr(0b1000010 + 0o42) + '\x65')(chr(0b1110101) + chr(116) + '\146' + '\x2d' + '\070')): SSiTTShKWDnT = SSiTTShKWDnT[nzTpIcepk0o8(chr(955 - 907) + chr(0b1101111) + chr(49), ord("\x08")):] if SSiTTShKWDnT and roI3spqORKae(SSiTTShKWDnT, roI3spqORKae(ES5oEprVxulp(b'0a9*\xc3\xde\x1c\x1dG{_\xe2'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101001 + 0o6) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(2708 - 2652)))(roI3spqORKae(ES5oEprVxulp(b'G'), chr(0b1001010 + 0o32) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(0b1001100 + 0o31))('\x75' + chr(8375 - 8259) + chr(0b1011100 + 0o12) + '\055' + chr(556 - 500))): SSiTTShKWDnT = SSiTTShKWDnT[:-nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + chr(392 - 343), 8)] if SSiTTShKWDnT and roI3spqORKae(SSiTTShKWDnT, roI3spqORKae(ES5oEprVxulp(b'\n,>\x13\xfe\xee*8Rf'), chr(0b111110 + 0o46) + '\145' + '\143' + '\157' + '\144' + '\x65')(chr(0b1110101) + chr(0b10101 + 0o137) + chr(0b101100 + 0o72) + chr(512 - 467) + chr(0b110000 + 0o10)))(roI3spqORKae(ES5oEprVxulp(b'\x11,+\x11'), chr(0b1100100) + chr(1003 - 902) + chr(0b1010110 + 0o15) + chr(111) + chr(826 - 726) + '\x65')(chr(117) + '\164' + chr(0b1100110) + chr(0b101101) + chr(684 - 628))): return SSiTTShKWDnT elif SSiTTShKWDnT: return ncb6gPauwqn0 + SSiTTShKWDnT else: return None
fedora-infra/fedora-messaging
setup.py
get_requirements
def get_requirements(requirements_file="requirements.txt"): """Get the contents of a file listing the requirements. Args: requirements_file (str): The path to the requirements file, relative to this file. Returns: list: the list of requirements, or an empty list if ``requirements_file`` could not be opened or read. """ with open(requirements_file) as fd: lines = fd.readlines() dependencies = [] for line in lines: maybe_dep = line.strip() if maybe_dep.startswith("#"): # Skip pure comment lines continue if maybe_dep.startswith("git+"): # VCS reference for dev purposes, expect a trailing comment # with the normal requirement __, __, maybe_dep = maybe_dep.rpartition("#") else: # Ignore any trailing comment maybe_dep, __, __ = maybe_dep.partition("#") # Remove any whitespace and assume non-empty results are dependencies maybe_dep = maybe_dep.strip() if maybe_dep: dependencies.append(maybe_dep) return dependencies
python
def get_requirements(requirements_file="requirements.txt"): """Get the contents of a file listing the requirements. Args: requirements_file (str): The path to the requirements file, relative to this file. Returns: list: the list of requirements, or an empty list if ``requirements_file`` could not be opened or read. """ with open(requirements_file) as fd: lines = fd.readlines() dependencies = [] for line in lines: maybe_dep = line.strip() if maybe_dep.startswith("#"): # Skip pure comment lines continue if maybe_dep.startswith("git+"): # VCS reference for dev purposes, expect a trailing comment # with the normal requirement __, __, maybe_dep = maybe_dep.rpartition("#") else: # Ignore any trailing comment maybe_dep, __, __ = maybe_dep.partition("#") # Remove any whitespace and assume non-empty results are dependencies maybe_dep = maybe_dep.strip() if maybe_dep: dependencies.append(maybe_dep) return dependencies
[ "def", "get_requirements", "(", "requirements_file", "=", "\"requirements.txt\"", ")", ":", "with", "open", "(", "requirements_file", ")", "as", "fd", ":", "lines", "=", "fd", ".", "readlines", "(", ")", "dependencies", "=", "[", "]", "for", "line", "in", "lines", ":", "maybe_dep", "=", "line", ".", "strip", "(", ")", "if", "maybe_dep", ".", "startswith", "(", "\"#\"", ")", ":", "# Skip pure comment lines", "continue", "if", "maybe_dep", ".", "startswith", "(", "\"git+\"", ")", ":", "# VCS reference for dev purposes, expect a trailing comment", "# with the normal requirement", "__", ",", "__", ",", "maybe_dep", "=", "maybe_dep", ".", "rpartition", "(", "\"#\"", ")", "else", ":", "# Ignore any trailing comment", "maybe_dep", ",", "__", ",", "__", "=", "maybe_dep", ".", "partition", "(", "\"#\"", ")", "# Remove any whitespace and assume non-empty results are dependencies", "maybe_dep", "=", "maybe_dep", ".", "strip", "(", ")", "if", "maybe_dep", ":", "dependencies", ".", "append", "(", "maybe_dep", ")", "return", "dependencies" ]
Get the contents of a file listing the requirements. Args: requirements_file (str): The path to the requirements file, relative to this file. Returns: list: the list of requirements, or an empty list if ``requirements_file`` could not be opened or read.
[ "Get", "the", "contents", "of", "a", "file", "listing", "the", "requirements", "." ]
be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7
https://github.com/fedora-infra/fedora-messaging/blob/be3e88534e2b15d579bcd24f9c4b7e795cb7e0b7/setup.py#L18-L48
train
Get the contents of a file listing the requirements. txt.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrP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vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1650 - 1602) + '\157' + '\x34' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110111) + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b110000) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(50) + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(11316 - 11205) + chr(1950 - 1900) + chr(2206 - 2155) + chr(54), 64524 - 64516), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1101 + 0o46) + chr(49) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100000 + 0o23) + '\060' + chr(0b11011 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + '\x32' + '\063' + chr(1097 - 1047), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1001100 + 0o43) + '\x33' + '\x35' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110111) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(6117 - 6006) + chr(0b101110 + 0o7) + chr(0b110010), 5666 - 5658), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b11100 + 0o25) + chr(319 - 266) + chr(48), 35454 - 35446), nzTpIcepk0o8(chr(1577 - 1529) + chr(111) + '\063' + chr(50) + chr(1628 - 1573), 0o10), nzTpIcepk0o8(chr(1244 - 1196) + chr(0b1101111) + chr(51) + chr(0b110100) + '\x32', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\062', 9595 - 9587), nzTpIcepk0o8(chr(48) + chr(2920 - 2809) + '\062' + '\x33' + '\062', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10001 + 0o42) + '\x37' + chr(0b110011 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(54) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(2292 - 2242) + chr(145 - 92), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(312 - 261) + chr(49) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101000 + 0o107) + chr(2224 - 2174) + chr(54) + chr(51), 34343 - 34335), nzTpIcepk0o8(chr(0b110000) + chr(0b101010 + 0o105) + chr(925 - 875) + chr(1954 - 1904) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + chr(52) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + '\x34' + '\x36', 57539 - 57531), nzTpIcepk0o8('\060' + chr(0b101111 + 0o100) + chr(49) + chr(0b110001) + chr(2436 - 2383), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\065' + '\062', 8), nzTpIcepk0o8(chr(210 - 162) + '\x6f' + chr(0b101001 + 0o11) + '\067' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b101010 + 0o105) + chr(0b101101 + 0o5) + chr(0b110111) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(658 - 610) + chr(0b1101111) + chr(2133 - 2084) + chr(0b10 + 0o61) + '\x37', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(3942 - 3831) + chr(0b100111 + 0o17) + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(1888 - 1777) + '\062' + chr(1425 - 1376) + chr(0b100 + 0o54), 27462 - 27454), nzTpIcepk0o8(chr(1750 - 1702) + chr(0b1101111) + '\x31' + '\x35' + chr(0b100111 + 0o15), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1808 - 1759) + chr(0b110111) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\x35' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(2389 - 2278) + chr(0b10111 + 0o32) + chr(0b100101 + 0o20) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(4476 - 4365) + '\064' + chr(53), 12538 - 12530), nzTpIcepk0o8(chr(0b110000) + chr(6338 - 6227) + chr(0b110011) + chr(0b110011) + chr(0b100101 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(1502 - 1454) + chr(1755 - 1644) + '\061' + chr(0b1000 + 0o51) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\062' + '\x36', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b1011 + 0o52) + chr(1501 - 1453), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0f'), '\144' + chr(101) + chr(0b1000000 + 0o43) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + '\164' + '\146' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def JLYakhkK1h1R(kjl7GbrumYi8=roI3spqORKae(ES5oEprVxulp(b'S\\0\xe1\xf7\xba\xa3\xf7\x89\x17^\x1b\xf9\x96z\xee'), chr(0b1011100 + 0o10) + chr(101) + chr(99) + chr(111) + '\x64' + chr(0b1100100 + 0o1))(chr(0b101111 + 0o106) + chr(9879 - 9763) + '\x66' + chr(966 - 921) + '\x38')): with DnU3Rq9N5ala(kjl7GbrumYi8) as RW6jRKOlF6C5: vniSnlI09HNg = RW6jRKOlF6C5.TKmlmUjNQ4dY() TLXpkPYvRSxc = [] for ffiOpFBWGmZU in vniSnlI09HNg: VB0kVTah3K50 = ffiOpFBWGmZU.kdIDrcwZTCs5() if roI3spqORKae(VB0kVTah3K50, roI3spqORKae(ES5oEprVxulp(b'RM \xe6\xea\xbb\xb1\xf3\x98\x11'), chr(963 - 863) + chr(0b1100101) + chr(0b1100001 + 0o2) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1001100 + 0o50) + '\x66' + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x02'), chr(2351 - 2251) + chr(5956 - 5855) + chr(0b110111 + 0o54) + chr(0b1101111) + '\x64' + chr(0b10000 + 0o125))('\x75' + '\x74' + '\x66' + '\x2d' + '\070')): continue if roI3spqORKae(VB0kVTah3K50, roI3spqORKae(ES5oEprVxulp(b'RM \xe6\xea\xbb\xb1\xf3\x98\x11'), '\x64' + chr(0b1100101) + chr(99) + chr(9020 - 8909) + chr(0b1100100) + chr(0b110 + 0o137))(chr(0b110011 + 0o102) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'FP5\xbf'), '\144' + chr(2916 - 2815) + '\x63' + chr(111) + chr(100) + '\145')('\x75' + chr(116) + chr(0b1010110 + 0o20) + '\x2d' + chr(0b111000))): (U5tbVIuvdqYi, U5tbVIuvdqYi, VB0kVTah3K50) = VB0kVTah3K50.rpartition(roI3spqORKae(ES5oEprVxulp(b'\x02'), '\x64' + '\x65' + '\143' + chr(111) + chr(0b1100100) + '\x65')(chr(117) + chr(0b1101001 + 0o13) + '\146' + chr(45) + chr(2558 - 2502))) else: (VB0kVTah3K50, U5tbVIuvdqYi, U5tbVIuvdqYi) = VB0kVTah3K50.y6tm5LzgZc_E(roI3spqORKae(ES5oEprVxulp(b'\x02'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1011110 + 0o7))(chr(0b1011110 + 0o27) + chr(7825 - 7709) + chr(0b1100110) + chr(45) + chr(0b11101 + 0o33))) VB0kVTah3K50 = VB0kVTah3K50.kdIDrcwZTCs5() if VB0kVTah3K50: roI3spqORKae(TLXpkPYvRSxc, roI3spqORKae(ES5oEprVxulp(b'im\x12\xa0\xe6\xaf\x81\xf5\x86\x16\x7f]'), chr(0b100010 + 0o102) + chr(101) + '\143' + chr(10570 - 10459) + chr(0b1110 + 0o126) + '\145')(chr(5528 - 5411) + chr(0b1011111 + 0o25) + chr(0b1100110) + chr(0b101101) + '\x38'))(VB0kVTah3K50) return TLXpkPYvRSxc