mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 01:40:52 +00:00
perf: After optimizing the execution of the azure vault task, the data is out of sync
This commit is contained in:
@@ -52,7 +52,8 @@ def sync_secret_to_vault():
|
||||
for model in to_sync_models:
|
||||
instances += list(model.objects.all())
|
||||
|
||||
with ThreadPoolExecutor(max_workers=10) as executor:
|
||||
max_workers = 1 if VaultTypeChoices.azure == vault_client.type else max_workers = 10
|
||||
with ThreadPoolExecutor(max_workers=max_workers) as executor:
|
||||
tasks = [executor.submit(sync_instance, instance) for instance in instances]
|
||||
|
||||
for future in as_completed(tasks):
|
||||
|
Reference in New Issue
Block a user