perf: 优化 account,去掉版本好

This commit is contained in:
ibuler
2023-02-22 11:18:42 +08:00
parent b91b9ef39e
commit 4c233cfb69
9 changed files with 43 additions and 54 deletions

View File

@@ -36,7 +36,7 @@ class PushAccountManager(ChangeSecretManager, AccountBasePlaybookManager):
def get_accounts(self, privilege_account, accounts: QuerySet):
if not privilege_account:
logger.debug(f'not privilege account')
print(f'not privilege account')
return []
snapshot_account_usernames = self.execution.snapshot['accounts']
if '*' in snapshot_account_usernames:
@@ -103,7 +103,7 @@ class PushAccountManager(ChangeSecretManager, AccountBasePlaybookManager):
if not account:
return
account.secret = new_secret
account.save(update_fields=['secret'])
account.save(update_fields=['secret', 'version'])
def on_host_error(self, host, error, result):
pass