[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.191.132.7: ~ $
U

'�7`V�@sdZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZddlmZzddlZejZWnek
r�dZeZYnXdZGd
d�dej �Z!Gdd�de!�Z"Gdd�de!�Z#dS)z%Async gunicorn worker for aiohttp.web�N)�	FrameType)�Any�	Awaitable�Callable�Optional�Union)�AccessLogFormat)�base)�web�)�
set_result)�Application)�AccessLogger)�GunicornWebWorker�GunicornUVLoopWebWorker�GunicornTokioWebWorkercs�eZdZejZejZe	e	dd��fdd�Z
dd��fdd�Zdd�dd	�Zdd�d
d�Z
dd�d
d�Zd eddd�dd�Zdd�dd�Zeedd�dd�Zeedd�dd�Zee	dd�dd��Zeed�dd�Z�ZS)!rN)�args�kw�returncs$t�j||�d|_d|_d|_dS�Nr)�super�__init__�_task�	exit_code�_notify_waiter)�selfrr��	__class__��A/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/worker.pyr%szGunicornWebWorker.__init__�rcs0t����t��|_t�|j�t���dS)N)�asyncio�get_event_loop�closeZnew_event_loop�loopZset_event_loopr�init_process�rrrrr%,s
zGunicornWebWorker.init_processcCs||j�|���|_z|j�|j�Wn tk
rD|j�d�YnXtj	dkrb|j�|j�
��|j��t�|j
�dS)NzException in gunicorn worker)��)r$Zcreate_task�_runrZrun_until_complete�	Exception�logZ	exception�sys�version_infoZshutdown_asyncgensr#�exitrr&rrr�run5s

zGunicornWebWorker.runc
�s�t|jt�r|j}n,t�|j�r0|��IdH}ntd�|j���|jjrP|j	j
nd}tj||j	|jj
||�|jj�d�}|��IdH|jjr�|�|j�nd}|}|dk	s�t�|j}|dk	s�t�|jD]0}tj||||jjddd�}|��IdHq�t��}z�|j�r�|��|j}	|jj�rF|	|jjk�rFd|_|j	�d|�nB|t��k�rz|j t�!�k�rzd|_|j	�d|�n|�"�IdH�qWnt#k
�r�YnX|�$�IdHdS)	NzUwsgi app should be either Application or async function returning Application, got {})ZloggerZkeepalive_timeout�
access_log�access_log_format�d�_)Zssl_contextZshutdown_timeoutFzMax requests, shutting down: %sz!Parent changed, shutting down: %s)%�
isinstanceZwsgir
r!Ziscoroutinefunction�RuntimeError�format�cfgZ	accesslogr+r0r
Z	AppRunnerZ	keepalive�_get_valid_log_formatr1ZsetupZis_ssl�_create_ssl_context�AssertionError�serverZsocketsZSockSiteZgraceful_timeout�start�os�getpid�aliveZnotifyZrequests_countZmax_requests�infoZppid�getppid�_wait_next_notify�
BaseExceptionZcleanup)
rZappr0Zrunner�ctxr;ZsockZsite�pidZcntrrrr)Bs\���
�zGunicornWebWorker._runzasyncio.Future[bool]cCs>|��|j}|dk	st�|��|_}|j�d|j|�|S)Ng�?)�_notify_waiter_doner$r:Z
create_futurerZ
call_later)rr$�waiterrrrrBzsz#GunicornWebWorker._wait_next_notify)rGrcCs4|dkr|j}|dk	r t|d�||jkr0d|_dS)NT)rr)rrGrrrrF�s

z%GunicornWebWorker._notify_waiter_donecCs�|j�tj|jtjd�|j�tj|jtjd�|j�tj|jtjd�|j�tj|j	tjd�|j�tj
|jtj
d�|j�tj|j
tjd�t�tjd�t�tj
d�dS�NF)r$Zadd_signal_handler�signal�SIGQUIT�handle_quit�SIGTERMZhandle_exit�SIGINT�SIGWINCHZhandle_winch�SIGUSR1Zhandle_usr1�SIGABRT�handle_abort�siginterruptr&rrr�init_signals�sL������zGunicornWebWorker.init_signals)�sig�framercCsd|_|j�|�|��dSrH)r?r7Z
worker_intrF�rrTrUrrrrK�szGunicornWebWorker.handle_quitcCs&d|_d|_|j�|�t�d�dS)NFr)r?rr7Zworker_abortr,r.rVrrrrQ�szGunicornWebWorker.handle_abort�
SSLContext)r7rcCs\tdkrtd��t�|j�}|�|j|j�|j|_|j	rF|�
|j	�|jrX|�|j�|S)z~Creates SSLContext instance for usage in asyncio.create_server.

        See ssl.SSLSocket.__init__ for more details.
        NzSSL is not supported.)
�sslr5rWZssl_versionZload_cert_chainZcertfileZkeyfileZ	cert_reqsZverify_modeZca_certsZload_verify_locationsZciphersZset_ciphers)r7rDrrrr9�sz%GunicornWebWorker._create_ssl_context)�
source_formatrcCs.||jkr|jSt�d|�r&td��n|SdS)Nz%\([^\)]+\)z�Gunicorn's style options in form of `%(name)s` are not supported for the log formatting. Please use aiohttp's format specification to configure access log formatting: http://docs.aiohttp.org/en/stable/logging.html#format-specification)�DEFAULT_GUNICORN_LOG_FORMAT�DEFAULT_AIOHTTP_LOG_FORMAT�re�search�
ValueError)rrYrrrr8�s
�z'GunicornWebWorker._get_valid_log_format)N)�__name__�
__module__�__qualname__rZ
LOG_FORMATr[�GunicornAccessLogFormat�defaultrZrrr%r/r)rBrrFrS�intrrKrQ�staticmethodr9�strr8�
__classcell__rrrrr s$	
8�� 	rcs"eZdZdd��fdd�Z�ZS)rNr cs0ddl}t����t�|���t���dSr)�uvloopr!r"r#�set_event_loop_policy�EventLoopPolicyrr%)rrhrrrr%�sz$GunicornUVLoopWebWorker.init_process�r_r`rar%rgrrrrr�srcs"eZdZdd��fdd�Z�ZS)rNr cs0ddl}t����t�|���t���dSr)�tokior!r"r#rirjrr%)rrlrrrr%�sz#GunicornTokioWebWorker.init_processrkrrrrr�sr)$�__doc__r!r=r\rIr,�typesr�typingrrrrrZgunicorn.configrrbZgunicorn.workersr	Zaiohttpr
ZhelpersrZweb_appr
Zweb_logrrXrW�ImportError�object�__all__ZWorkerrrrrrrr�<module>s0

@

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 3.61 KB 0644
__init__.cpython-38.pyc File 3.61 KB 0644
abc.cpython-38.opt-1.pyc File 8.11 KB 0644
abc.cpython-38.pyc File 8.11 KB 0644
base_protocol.cpython-38.opt-1.pyc File 2.49 KB 0644
base_protocol.cpython-38.pyc File 2.58 KB 0644
client.cpython-38.opt-1.pyc File 27.85 KB 0644
client.cpython-38.pyc File 28 KB 0644
client_exceptions.cpython-38.opt-1.pyc File 10.03 KB 0644
client_exceptions.cpython-38.pyc File 10.03 KB 0644
client_proto.cpython-38.opt-1.pyc File 5.99 KB 0644
client_proto.cpython-38.pyc File 5.99 KB 0644
client_reqrep.cpython-38.opt-1.pyc File 26.76 KB 0644
client_reqrep.cpython-38.pyc File 27.02 KB 0644
client_ws.cpython-38.opt-1.pyc File 8.65 KB 0644
client_ws.cpython-38.pyc File 8.65 KB 0644
connector.cpython-38.opt-1.pyc File 30.14 KB 0644
connector.cpython-38.pyc File 30.27 KB 0644
cookiejar.cpython-38.opt-1.pyc File 9.07 KB 0644
cookiejar.cpython-38.pyc File 9.11 KB 0644
formdata.cpython-38.opt-1.pyc File 4.38 KB 0644
formdata.cpython-38.pyc File 4.41 KB 0644
frozenlist.cpython-38.opt-1.pyc File 2.56 KB 0644
frozenlist.cpython-38.pyc File 2.56 KB 0644
hdrs.cpython-38.opt-1.pyc File 3.53 KB 0644
hdrs.cpython-38.pyc File 3.53 KB 0644
helpers.cpython-38.opt-1.pyc File 22.43 KB 0644
helpers.cpython-38.pyc File 22.43 KB 0644
http.cpython-38.opt-1.pyc File 1.21 KB 0644
http.cpython-38.pyc File 1.21 KB 0644
http_exceptions.cpython-38.opt-1.pyc File 4.17 KB 0644
http_exceptions.cpython-38.pyc File 4.17 KB 0644
http_parser.cpython-38.opt-1.pyc File 15.58 KB 0644
http_parser.cpython-38.pyc File 15.66 KB 0644
http_websocket.cpython-38.opt-1.pyc File 14.34 KB 0644
http_websocket.cpython-38.pyc File 14.46 KB 0644
http_writer.cpython-38.opt-1.pyc File 4.88 KB 0644
http_writer.cpython-38.pyc File 4.88 KB 0644
locks.cpython-38.opt-1.pyc File 1.65 KB 0644
locks.cpython-38.pyc File 1.65 KB 0644
log.cpython-38.opt-1.pyc File 438 B 0644
log.cpython-38.pyc File 438 B 0644
multipart.cpython-38.opt-1.pyc File 25.11 KB 0644
multipart.cpython-38.pyc File 25.55 KB 0644
payload.cpython-38.opt-1.pyc File 12.8 KB 0644
payload.cpython-38.pyc File 12.8 KB 0644
payload_streamer.cpython-38.opt-1.pyc File 3.15 KB 0644
payload_streamer.cpython-38.pyc File 3.15 KB 0644
pytest_plugin.cpython-38.opt-1.pyc File 9.17 KB 0644
pytest_plugin.cpython-38.pyc File 9.22 KB 0644
resolver.cpython-38.opt-1.pyc File 3.7 KB 0644
resolver.cpython-38.pyc File 3.7 KB 0644
signals.cpython-38.opt-1.pyc File 1.26 KB 0644
signals.cpython-38.pyc File 1.26 KB 0644
streams.cpython-38.opt-1.pyc File 17.57 KB 0644
streams.cpython-38.pyc File 17.84 KB 0644
tcp_helpers.cpython-38.opt-1.pyc File 1.08 KB 0644
tcp_helpers.cpython-38.pyc File 1.08 KB 0644
test_utils.cpython-38.opt-1.pyc File 20.44 KB 0644
test_utils.cpython-38.pyc File 20.58 KB 0644
tracing.cpython-38.opt-1.pyc File 13.98 KB 0644
tracing.cpython-38.pyc File 13.98 KB 0644
typedefs.cpython-38.opt-1.pyc File 1.28 KB 0644
typedefs.cpython-38.pyc File 1.28 KB 0644
web.cpython-38.opt-1.pyc File 9.48 KB 0644
web.cpython-38.pyc File 9.48 KB 0644
web_app.cpython-38.opt-1.pyc File 14.85 KB 0644
web_app.cpython-38.pyc File 14.89 KB 0644
web_exceptions.cpython-38.opt-1.pyc File 11.73 KB 0644
web_exceptions.cpython-38.pyc File 11.73 KB 0644
web_fileresponse.cpython-38.opt-1.pyc File 4.47 KB 0644
web_fileresponse.cpython-38.pyc File 4.51 KB 0644
web_log.cpython-38.opt-1.pyc File 6.96 KB 0644
web_log.cpython-38.pyc File 6.96 KB 0644
web_middlewares.cpython-38.opt-1.pyc File 3.72 KB 0644
web_middlewares.cpython-38.pyc File 3.8 KB 0644
web_protocol.cpython-38.opt-1.pyc File 15.28 KB 0644
web_protocol.cpython-38.pyc File 15.46 KB 0644
web_request.cpython-38.opt-1.pyc File 22.07 KB 0644
web_request.cpython-38.pyc File 22.18 KB 0644
web_response.cpython-38.opt-1.pyc File 18.96 KB 0644
web_response.cpython-38.pyc File 19.87 KB 0644
web_routedef.cpython-38.opt-1.pyc File 7.62 KB 0644
web_routedef.cpython-38.pyc File 7.62 KB 0644
web_runner.cpython-38.opt-1.pyc File 11.35 KB 0644
web_runner.cpython-38.pyc File 11.45 KB 0644
web_server.cpython-38.opt-1.pyc File 2.69 KB 0644
web_server.cpython-38.pyc File 2.69 KB 0644
web_urldispatcher.cpython-38.opt-1.pyc File 40.38 KB 0644
web_urldispatcher.cpython-38.pyc File 41.2 KB 0644
web_ws.cpython-38.opt-1.pyc File 12.77 KB 0644
web_ws.cpython-38.pyc File 12.91 KB 0644
worker.cpython-38.opt-1.pyc File 6.7 KB 0644
worker.cpython-38.pyc File 6.77 KB 0644