Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /usr/local/lib/python3.9/site-packages/celery/backends/database/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.9/site-packages/celery/backends/database/__pycache__/session.cpython-39.pyc
a

��Sh��@s�dZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
zdd	lmZWney�dd	lmZYn0e�Zd
ZdZdd
�ZGdd�d�ZdS)zSQLAlchemy session.�N)�register_after_fork)�
create_engine)�
DatabaseError)�sessionmaker)�NullPool)� get_exponential_backoff_interval)�declarative_base)�SessionManager�
cCs|��dS�N)�_after_fork)�session�r�J/usr/local/lib/python3.9/site-packages/celery/backends/database/session.py�_after_fork_cleanup_sessionsrc@sBeZdZdZdd�Zdd�Zdd�Zdd	d
�Zdd�Zd
d�Z	dS)r	zManage SQLAlchemy sessions.cCs.i|_i|_d|_d|_tdur*t|t�dS)NF)�_engines�	_sessions�forked�preparedrr��selfrrr�__init__ szSessionManager.__init__cCs
d|_dS)NT)rrrrrr(szSessionManager._after_forkcKsp|jrFz|j|WStyBt|fi|��}|j|<|YS0n&dd�|��D�}t|fdti|��SdS)NcSs i|]\}}|�d�s||�qS)�pool)�
startswith)�.0�k�vrrr�
<dictcomp>3s
�z-SessionManager.get_engine.<locals>.<dictcomp>Z	poolclass)rr�KeyErrorr�itemsr)r�dburi�kwargs�enginerrr�
get_engine+szSessionManager.get_engineFcKsR|j|fi|��}|jrD|s&||jvr6t|d�|j|<||j|fS|t|d�fS)N)�bind)r#rrr)rr Zshort_lived_sessionsr!r"rrr�create_session7szSessionManager.create_sessioncCsl|jshd}ztj�|�Wqbty\|tkrVtd|dd�}t�|d�|d7}n�Yq
0qbq
d|_dS)Nrr
i�T�)	r�ResultModelBase�metadataZ
create_allr�PREPARE_MODELS_MAX_RETRIESr�time�sleep)rr"�retriesZsleep_amount_msrrr�prepare_models?s�
zSessionManager.prepare_modelscKs&|j|fi|��\}}|�|�|�Sr)r%r-)rr r!r"r
rrr�session_factoryVs
zSessionManager.session_factoryN)F)
�__name__�
__module__�__qualname__�__doc__rrr#r%r-r.rrrrr	s
r	)r2r*Zkombu.utils.compatrZ
sqlalchemyrZsqlalchemy.excrZsqlalchemy.ormrZsqlalchemy.poolrZcelery.utils.timerr�ImportErrorZsqlalchemy.ext.declarativer'�__all__r)rr	rrrr�<module>s 

Yohohohohohooho | Sanrei Aya