
    0Fie                    r    d dl mZ d dlmZ d dlmZmZ d dlmZm	Z	 d dl
mZ d dlmZ  G d de          Zd	S )
    )annotations)
Collection)AnyLiteral)DEFAULT_CLUSTER_DUMP_EXCLUDEDEFAULT_CLUSTER_DUMP_FORMAT)SchedulerPlugin)	Schedulerc                  0    e Zd ZdZeefdd
ZddZddZdS )ClusterDumpa   Dumps cluster state prior to Scheduler shutdown

    The Scheduler may shutdown in cases where it is in an error state,
    or when it has been unexpectedly idle for long periods of time.
    This plugin dumps the cluster state prior to Scheduler shutdown
    for debugging purposes.
    urlstrexcludeCollection[str]format_Literal['msgpack', 'yaml']storage_optionsdict[str, Any]c                >    || _         || _        || _        || _        d S N)r   r   formatr   )selfr   r   r   r   s        Dlib/python3.11/site-packages/distributed/diagnostics/cluster_dump.py__init__zClusterDump.__init__   s'     .    	schedulerr
   returnNonec                   K   || _         d S r   )r   )r   r   s     r   startzClusterDump.start#   s      "r   c                h   K    | j         j        | j        | j        | j        fi | j         d {V  d S r   )r   dump_cluster_state_to_urlr   r   r   r   )r   s    r   before_closezClusterDump.before_close&   sd      6dn6HdlDK
 
373G
 
 	
 	
 	
 	
 	
 	
 	
 	
 	
r   N)r   r   r   r   r   r   r   r   )r   r
   r   r   )r   r   )	__name__
__module____qualname____doc__r   r   r   r    r#    r   r   r   r      sh          $@.I	
/ 
/ 
/ 
/ 
/# # # #
 
 
 
 
 
r   r   N)
__future__r   collections.abcr   typingr   r   distributed.cluster_dumpr   r   distributed.diagnostics.pluginr	   distributed.schedulerr
   r   r(   r   r   <module>r/      s    " " " " " " & & & & & &                ; : : : : : + + + + + +
 
 
 
 
/ 
 
 
 
 
r   