
    N[i                     X    d dl Z d dlZd dlmZ  e j                  e      Z G d d      Zy)    N)rawc                       e Zd Z	 	 ddZy)	Terminatec                   K   | j                   st        d      | j                  r_| j                  t        j
                  j                  j                                d{    t        j                  d| j                         | j                  j                          d{    | j                  j                          d{    | j                  j                         D ]  }|j                          d{     | j                  j!                          | j"                  j%                          | j&                  | j&                   d{    | j"                  j!                          d| _         y7 7 7 7 7 /w)aF  Terminate the client by shutting down workers.

        This method does the opposite of :meth:`~pyrogram.Client.initialize`.
        It will stop the dispatcher and shut down updates and download workers.

        Raises:
            ConnectionError: In case you try to terminate a client that is already terminated.
        zClient is already terminatedNzTakeout session %s finishedF)is_initializedConnectionError
takeout_idinvoker   	functionsaccountFinishTakeoutSessionloginfostoragesave
dispatcherstopmedia_sessionsvaluesclearupdates_watchdog_eventsetupdates_watchdog_task)selfmedia_sessions     R/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/auth/terminate.py	terminatezTerminate.terminate   s/     ""!"@AA??++cmm33HHJKKKHH2DOODll!!!oo""$$$!00779 	'M$$&&&	' 	!!###'')%%1,,,,##))+#% L 	"$ ' -s\   AF E6!AF"E9#!FE;4F9E=:AFE?'F9F;F=F?FN)r   zpyrogram.Client)__name__
__module____qualname__r        r   r   r      s    !$!$r"   r   )loggingpyrogramr   	getLoggerr   r   r   r!   r"   r   <module>r&      s,   &   g!"$ "$r"   