Ë
    âß²j•  ã                  óF   — d Z ddlmZ ddlZddlmZmZmZ ddlm	Z	 ddd„Z
y)	a�  Profile-scoped reads of the ``HERMES_*`` tuning settings cron honours from ``.env``.

A standalone ``hermes -p X gateway run`` loads X's ``.env`` into ``os.environ``, so a bare
``os.getenv("HERMES_CRON_TIMEOUT")`` is X's value. Under ``gateway.multiplex_profiles`` the same
tick runs inside the default profile's process, where ``os.environ`` holds the DEFAULT profile's
``.env``. With a secret scope installed (job run + delivery) the scope is authoritative; the tick
loop itself (due-job scan, pool sizing) runs under the profile's home override only, so the
setting is read from that home's ``.env``. Outside multiplex the read is the plain environ.
é    )ÚannotationsN)Úcurrent_secret_scopeÚis_multiplex_activeÚload_env_file)Úget_hermes_homec                óÌ   — t        «       st        j                  | «      xs |S t        «       }|€t	        t        «       dz  «      }|j                  | «      }|€|S t        |«      S )Nz.env)r   ÚosÚgetenvr   r   r   ÚgetÚstr)ÚnameÚdefaultÚscopeÚvalues       ú6/home/ubuntu/.hermes/hermes-agent/cron/env_settings.pyÚcron_env_settingr      sZ   € ÜÔ Ü�y‰y˜‹Ò) 'Ð)Ü Ó"€EØ€}ÜœoÓ/°&Ñ8Ó9ˆØ�I‰I�d‹O€EØ�mˆ7Ð3¬¨U«Ð3ó    )Ú )r   r   r   r   Úreturnr   )Ú__doc__Ú
__future__r   r	   Úagent.secret_scoper   r   r   Úhermes_constantsr   r   © r   r   ú<module>r      s    ðñõ #ã 	ç WÑ WÝ ,õ4r   