From 2d62dc06571141dbd3208ae96894d4ffd60e2355 Mon Sep 17 00:00:00 2001 From: Bai <baijiangjie@gmail.com> Date: Mon, 2 Dec 2024 11:07:38 +0800 Subject: [PATCH] fix: azure vault max_workers --- apps/accounts/tasks/vault.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/accounts/tasks/vault.py b/apps/accounts/tasks/vault.py index a3de20c5f..906b395cb 100644 --- a/apps/accounts/tasks/vault.py +++ b/apps/accounts/tasks/vault.py @@ -52,7 +52,7 @@ def sync_secret_to_vault(): for model in to_sync_models: instances += list(model.objects.all()) - max_workers = 1 if VaultTypeChoices.azure == vault_client.type else max_workers = 10 + max_workers = 1 if VaultTypeChoices.azure == vault_client.type else 10 with ThreadPoolExecutor(max_workers=max_workers) as executor: tasks = [executor.submit(sync_instance, instance) for instance in instances]