
    Xh                     T    d Z ddlmZmZ ddlmZ ddlmZ dZ G d de      Z	de	fgZ
y	)
z-HTTP handler to shut down the Jupyter server.    )ioloopweb)
authorized)JupyterHandlerserverc                   B    e Zd ZdZeZej                  ed               Z	y)ShutdownHandlerzA shutdown API handler.c                    K   | j                   j                  d       | j                  r"| j                  j                          d{    t        j
                  j                         j                          y7 1w)zShut down the server.z'Shutting down on /api/shutdown request.N)loginfo	serverapp_cleanupr   IOLoopcurrentstop)selfs    T/var/www/html/myenv/lib/python3.12/site-packages/jupyter_server/services/shutdown.pypostzShutdownHandler.post   sT      	?@>>..))+++$$& ,s   AA;A92A;N)
__name__
__module____qualname____doc__AUTH_RESOURCEauth_resourcer   authenticatedr   r        r   r	   r	      s*    !!M'  'r   r	   z/api/shutdownN)r   tornador   r   jupyter_server.auth.decoratorr   jupyter_server.base.handlersr   r   r	   default_handlersr   r   r   <module>r"      s4    3  4 7'n '$ ' r   