+
    jHàjŸ  ã                  óf   € R t ^ RIHt ^ RIt^ RIHt ]P                  ! R4      tR R ltR R lt	R# )	zORecover heartbeat watches from the gateway's canonical persisted routing index.)ÚannotationsN©ÚPathzgateway.runc               ó   € V ^8„  d   QhRR/# )é   ÚreturnÚlist© )Úformats   "ÚB/home/ubuntu/.hermes/hermes-agent/gateway/run_heartbeat_restore.pyÚ__annotate__r   
   s   € ÷ 	=ñ 	=¨Dñ 	=ó    c                óþ   € ^ RI Hp V.p\        \        V RR4      RR4      '       d-   Y2! V P                  4       UUu. uF  w  rEVNK	  	  upp,          p\	        \
        P                  R V 4       4      4      # u uppi )u   Every home the sweep's ``_profile_scope_for_source`` can resolve an origin to: the gateway home
plus, under multiplex, the whole served set INCLUDING ``default`` â€” a ``-p work`` multiplexer's own
home is not ``~/.hermes``, so dropping ``default`` here would hide its heartbeats forever.)Ú_multiplex_profile_homesÚconfigNÚmultiplex_profilesFc              3  ó8   "  € T F  p\        V4      x € K  	  R # 5i©Nr   )Ú.0Úhomes   & r   Ú	<genexpr>Ú!_watched_homes.<locals>.<genexpr>   s   é € Ð;±U¨Tœd 4Ÿj˜j³Uùs   ‚)Úgateway.runr   Úgetattrr   r   ÚdictÚfromkeys)ÚrunnerÚdefault_homer   ÚhomesÚ_namer   s   &&    r   Ú_watched_homesr    
   sn   € õ 5àˆN€EÜŒw�v˜x¨Ó.Ð0DÀe×LÒLØÐ*BÀ6Ç=Á=Ô*QÔRÑ*Q™;˜5“$Ñ*QÒRÕRˆÜ”—‘Ñ;±UÓ;Ó;Ó<Ð<ùó Ss   ½A9c               ó   € V ^8„  d   QhRR/# )r   r   ÚNoner	   )r
   s   "r   r   r      s   € ÷ 9\ñ 9\¨tñ 9\r   c              ƒ  ón  a aaaa	a
"  € ^ RI Ho ^ RIHo	 ^ RIHo ^ RIHo S P                  o
VVVV	V V
3R lp S P                  V4      G Rj  x€L
 pV F0  w  r4pS
P                  V4      V8X  g   K  S P                  W4V4       K2  	  R#  L<  \         d    \        P                  RRR	7        R# i ; i5i)
a1  Retryable startup/poll scan; failed reads never prune existing watches.

SessionStore owns one routing index across profiles. Its origin and exact key,
rather than a second heartbeat routing snapshot, also cover pre-upgrade state.
Run all storage work off-loop so a cold profile DB cannot block adapters.
)Ú_profile_runtime_scope)Úprofile_has_active_heartbeat)ÚHeartbeatManager)Úget_hermes_homec                 ó2  <€ . p \        SR R4      ;'       g    S! 4       p\        ;QJ d)    V	3R l\        S
V4       4       F  '       g   K   RM	  RM! V	3R l\        S
V4       4       4      '       g   V # S! V4      ;_uu_ 4        / pSP                  4        Fz  pVP                  e%   VP
                  '       d   VP                  '       d   K7   S
P                  V4      pVP                  S
P                  V4      . 4      P                  W434       K|  	  VP                  4        F�  p S
P!                  V^ ,          ^,          4      ;_uu_ 4        V FU  w  r4 S! VP
                  4      P#                  4       '       d*   V P                  VP                  WCP
                  34       KU  KW  	  RRR4       K‘  	  RRR4       V #   \         d(    \        P                  RTP                  RR7        EK\  i ; i  \         d'    \        P                  RTP                  RR7        KÔ  i ; i  + '       g   i     EK  ; i  \         d6    \        P                  RT^ ,          ^ ,          P                  RR7        EKZ  i ; i  + '       g   i     T # ; i)Ú_routing_homeNc              3  ó4   <"  € T F  pS! V4      x € K  	  R # 5ir   r	   )r   Úhr%   s   & €r   r   Ú:restore_heartbeat_watches.<locals>.scan.<locals>.<genexpr>+   s   øé € ÐYÑ<X°qÑ/°×2Ð2Ó<Xùs   ƒTFzheartbeat restore for %s failed©Úexc_infoz%heartbeat restore scope for %s failed)r   Úanyr    Úlist_sessionsÚoriginÚ
session_idÚ	suspendedÚ_restored_sourceÚ
setdefaultÚ_profile_scope_key_for_sourceÚappendÚ	ExceptionÚloggerÚdebugÚsession_keyÚvaluesÚ_profile_scope_for_sourceÚ	is_active)Úrestoredr   Úby_scopeÚentryÚsourceÚgroupr&   r$   r'   r%   r   Ústores         €€€€€€r   ÚscanÚ'restore_heartbeat_watches.<locals>.scan$   s*  ø€ Øˆô �u˜o¨tÓ4×IÐI¹Ó8Iˆ÷ ‹sÔY¼NÈ6ÐSWÔ<XÓY�s�sŠsÔY¼NÈ6ÐSWÔ<XÓY×YÒYØˆOÙ# D×)Õ)ð
  ˆHØ×,Ñ,Ö.�Ø—<‘<Ò'¨u×/?×/?Ð/?À5Ç?Ç?À?ÙðfØ#×4Ñ4°UÓ;�FØ×'Ñ'¨×(LÑ(LÈVÓ(TÐVXÓY×`Ñ`ÐbgÐapÖqñ /ð "Ÿ™Ö*�ð	rØ×9Ñ9¸%À½(À1½+×FÕFÛ-2™M˜EðrÙ#3°E×4DÑ4DÓ#E×#OÑ#O×#QÒ#QØ$,§O¡O°U×5FÑ5FÈ×P`ÑP`Ð4aÖ$bñ $Rñ .3÷ GÑFñ +÷ *ð2 ˆøô !ô fÜ—L‘LÐ!BÀE×DUÑDUÐ`d�L×eÐeðfûô $-ô rÜ &§¡Ð-NÐPU×PaÑPaÐlp × qðrú÷ G×FÑFûô !ô rÜ—L‘LÐ!HÈ%ÐPQÍ(ÐSTÍ+×JaÑJaÐlp�L×qÐqðrú÷/ *Ö)ð2 ˆúsª   Â5JÂ<JÃJÃAGÄJÄ+'IÅH-ÅAG9Æ(H-Æ.IÆ6JÇ-G6	Ç1JÇ5G6	Ç6JÇ9-H*È&H-È)H*È*H-È-H?È8IÈ<JÈ?IÉ;J	É=JÊJ	ÊJÊJ	Nz4heartbeat restore scan failed; retrying on next pollTr-   )r   r$   Úgateway.run_idle_gatesr%   Úhermes_cli.heartbeatr&   Úhermes_constantsr'   Úsession_storeÚ_run_in_executor_with_contextÚpeek_session_idÚ_register_heartbeat_watchr8   r9   r:   )r   rE   Ú
candidatesÚkeyrB   r2   r&   r$   r'   r%   rD   s   f     @@@@@r   Úrestore_heartbeat_watchesrP      sŸ   ýé € õ 3ÝCÝ5Ý0à× Ñ €E÷"ò "ðH\Ø!×?Ñ?ÀÓE×Eˆ
Û'1Ñ#ˆC˜à×$Ñ$ SÓ)¨ZÖ7Ø×0Ñ0°¸jÖIó (2ñ Føô
 ô \Ü�‰ÐKÐVZˆ×[ð\üs@   ˆ0B5¹B ÁB
ÁB Á2B ÂB5Â
B Â"B2Â.B5Â1B2Â2B5)
Ú__doc__Ú
__future__r   ÚloggingÚpathlibr   Ú	getLoggerr9   r    rP   r	   r   r   Ú<module>rV      s,   ðÙ UÝ "ã Ý à	×	Ò	˜=Ó	)€õ	=÷9\r   