§
    ôcØ  ã                   ó    — d dl Z d dlZd dlmZ  e j        e¦  «        Zej        j        dej        j	        dej        j
        diZd„ Zd„ Zd„ ZdS )	é    N)ÚmonitorÚstartÚfinishÚfailc                 ó   — dS )z:
    No initialization is necessary for this monitor.
    N© )Úping_urlÚconfig_filenameÚmonitoring_log_levelÚdry_runs       ú9/usr/lib/python3/dist-packages/borgmatic/hooks/cronhub.pyÚinitialize_monitorr      ó	   € ð 	€Dó    c                 óê  — |rdnd}d                      t          |         ¦  «        }| d                              d|¦  «                             d|¦  «        }t                               d                      ||j                             ¦   «         |¦  «        ¦  «         t                               d                      ||¦  «        ¦  «         |s¦t          j	        d	¦  «         
                    t          j        ¦  «         	 t          j        |¦  «        }|j        s|                     ¦   «          dS dS # t          j        j        $ r*}	t                               |› d
|	› �¦  «         Y d}	~	dS d}	~	ww xY wdS )zÁ
    Ping the configured Cronhub URL, modified with the monitor.State. Use the given configuration
    filename in any log entries. If this is a dry run, then don't actually ping anything.
    z  (dry run; not actually pinging)Ú z/{}/r	   z/start/z/ping/z{}: Pinging Cronhub {}{}z{}: Using Cronhub ping URL {}Úurllib3z: Cronhub error: N)ÚformatÚMONITOR_STATE_TO_CRONHUBÚreplaceÚloggerÚinfoÚnameÚlowerÚdebugÚloggingÚ	getLoggerÚsetLevelÚERRORÚrequestsÚgetÚokÚraise_for_statusÚ
exceptionsÚRequestExceptionÚwarning)
Úhook_configr
   Ústater   r   Údry_run_labelÚformatted_stater	   ÚresponseÚerrors
             r   Úping_monitorr-      s‰  € ð
 ;BÐIÐ6Ð6Àr€MØ—m’mÕ$<¸UÔ$CÑDÔD€Oà�JÔß	Š�˜OÑ	,Ô	,ß	Š�˜?Ñ	+Ô	+ð õ ‡K‚KØ"×)Ò)¨/¸5¼:×;KÒ;KÑ;MÔ;MÈ}Ñ]Ô]ñô ð õ ‡L‚LÐ0×7Ò7¸ÈÑRÔRÑSÔSÐSàð IÝÔ˜)Ñ$Ô$×-Ò-­g¬mÑ<Ô<Ð<ð	IÝ”| HÑ-Ô-ˆHØ”;ð ,Ø×)Ò)Ñ+Ô+Ð+Ð+Ð+ð,ð ,øåÔ"Ô3ð 	Ið 	Ið 	IÝ�NŠN˜oÐGÐGÀÐGÐGÑHÔHÐHÐHÐHÐHÐHÐHÐHøøøøð	IøøøðIð Is   Ã?/D2 Ä2E0ÅE+Å+E0c                 ó   — dS )z7
    No destruction is necessary for this monitor.
    Nr   )Úping_url_or_uuidr
   r   r   s       r   Údestroy_monitorr0   5   r   r   )r   r    Úborgmatic.hooksr   r   Ú__name__r   ÚStateÚSTARTÚFINISHÚFAILr   r   r-   r0   r   r   r   ú<module>r7      s�   ðØ €€€à €€€à #Ð #Ð #Ð #Ð #Ð #à	ˆÔ	˜8Ñ	$Ô	$€ð „MÔ˜Ø„MÔ˜(Ø„MÔ˜ðÐ ð	ð 	ð 	ðIð Ið Ið8	ð 	ð 	ð 	ð 	r   