bartender.shared.dirac#
Attributes#
Functions#
|
Get the time left on the current proxy. |
|
Create or renew DIRAC proxy. |
|
Create or renew DIRAC proxy. |
|
|
|
Task that makes sure the proxy is renewed when it is close to expiring. |
|
Make valid dirac proxy. |
|
Set up a renewer for the DIRAC proxy. |
|
Tear down the renewer for the DIRAC proxy. |
Module Contents#
- bartender.shared.dirac.logger#
- bartender.shared.dirac.get_time_left_on_proxy() → int#
Get the time left on the current proxy.
- Returns:
The time left on the current proxy in seconds.
- Raises:
ValueError – If failed to get proxy info.
- Return type:
- async bartender.shared.dirac.proxy_init(config: bartender.shared.dirac_config.ProxyConfig) → None#
Create or renew DIRAC proxy.
- Parameters:
config (bartender.shared.dirac_config.ProxyConfig) – How to create a new proxy.
- Raises:
CalledProcessError – If failed to create proxy.
- Return type:
None
- bartender.shared.dirac.sync_proxy_init(config: bartender.shared.dirac_config.ProxyConfig) → None#
Create or renew DIRAC proxy.
- Parameters:
config (bartender.shared.dirac_config.ProxyConfig) – How to create a new proxy.
- Return type:
None
- bartender.shared.dirac._proxy_init_command(config: bartender.shared.dirac_config.ProxyConfig) → list[str]#
- Parameters:
config (bartender.shared.dirac_config.ProxyConfig) –
- Return type:
- async bartender.shared.dirac.renew_proxy_task(config: bartender.shared.dirac_config.ProxyConfig) → None#
Task that makes sure the proxy is renewed when it is close to expiring.
- Parameters:
config (bartender.shared.dirac_config.ProxyConfig) – How to create a new proxy.
- Return type:
None
- async bartender.shared.dirac.make_valid_dirac_proxy(config: bartender.shared.dirac_config.ProxyConfig) → int#
Make valid dirac proxy.
- Parameters:
config (bartender.shared.dirac_config.ProxyConfig) – How to create a new proxy.
- Returns:
The time left on the current proxy in seconds.
- Return type:
- bartender.shared.dirac.Renewer#
- bartender.shared.dirac.setup_proxy_renewer(config: bartender.shared.dirac_config.ProxyConfig) → None#
Set up a renewer for the DIRAC proxy.
- Parameters:
config (bartender.shared.dirac_config.ProxyConfig) – How to create a new proxy.
- Raises:
ValueError – If there is already a renewer with a different config.
- Return type:
None