§
    ;¹4f/  ã                   óz   — d dl Z d dlmZ d dlmZ d dlmZ ddlmZ  e j	        e
¦  «        Zdd„Zdd	„Zdefd
„ZdS )é    N)ÚFastAPI)ÚCORSMiddleware)Úsettingsé   )Úroot_api_routerÚreturnc               ƒ   ó>   K  — t                                d¦  «         dS )z‚Define FastAPI startup event handler.

    Resources:
        1. https://fastapi.tiangolo.com/advanced/events/#startup-event

    z&Execute FastAPI startup event handler.N©ÚlogÚdebug© ó    ú$/var/www/html/ls-bot-apis/app/app.pyÚ
on_startupr      s    è è € õ ‡I‚IÐ6Ñ7Ô7Ð7Ø€Dr   c               ƒ   ó>   K  — t                                d¦  «         dS )z„Define FastAPI shutdown event handler.

    Resources:
        1. https://fastapi.tiangolo.com/advanced/events/#shutdown-event

    z'Execute FastAPI shutdown event handler.Nr
   r   r   r   Úon_shutdownr      s    è è € õ ‡I‚IÐ7Ñ8Ô8Ð8Ø€Dr   c                  ód  — t                                d¦  «         t          t          j        t          j        t          j        t          gt          g¬¦  «        } |  	                    t          dgdg d¢dg¬¦  «         t                                d¦  «         |                      t          ¦  «         | S )z)Initialize FastAPI application.
    
    z$Initialize FastAPI application node.)Útitler   Údocs_urlr   r   Ú*T)ÚGETÚPOSTÚPUTÚDELETEÚOPTIONS)Úallow_originsÚallow_credentialsÚallow_methodsÚallow_headerszAdd application routes.)r   r   r   r   ÚPROJECT_NAMEÚDEBUGÚDOCS_URLr   r   Úadd_middlewarer   Úinclude_routerr   )Úapps    r   Úget_applicationr&   "   s«   € õ
 ‡I‚IÐ4Ñ5Ô5Ð5Ý
ÝÔ#ÝŒnÝÔ"Ý�<Ý �Mðñ ô €Cð ×Ò�Ø�eØØAÐAÐAØ�eð	 ñ ô ð õ ‡I‚IÐ'Ñ(Ô(Ð(Ø×Ò•Ñ'Ô'Ð'à€Jr   )r   N)ÚloggingÚfastapir   Úfastapi.middleware.corsr   Úapp.configsr   Úroutersr   Ú	getLoggerÚ__name__r   r   r   r&   r   r   r   ú<module>r.      s·   ðØ €€€Ø Ð Ð Ð Ð Ð Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2à  Ð  Ð  Ð  Ð  Ð  Ø $Ð $Ð $Ð $Ð $Ð $ð €gÔ˜Ñ!Ô!€ð	ð 	ð 	ð 	ð	ð 	ð 	ð 	ð˜ð ð ð ð ð ð r   