perf: Hide azure vault

pull/14507/head
feng 2024-11-21 11:38:42 +08:00 committed by ZhaoJiSen
parent 6abfeee683
commit 68a490d305
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,10 @@ logger = get_logger(__file__)
def get_vault_client(raise_exception=False, **kwargs):
tp = kwargs.get('VAULT_BACKEND') if kwargs.get('VAULT_ENABLED') else VaultTypeChoices.local
# TODO: Temporary processing, subsequent deletion
tp = VaultTypeChoices.local if tp == VaultTypeChoices.azure else tp
try:
module_path = f'apps.accounts.backends.{tp}.main'
client = import_module(module_path).Vault(**kwargs)