mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-03 18:16:37 +00:00
perf: 优化迁移账号,性能提高50倍
This commit is contained in:
parent
7939ef34b0
commit
6e3d950e23
@ -18,7 +18,7 @@ def migrate_old_authbook_to_history(apps, schema_editor):
|
|||||||
|
|
||||||
print()
|
print()
|
||||||
while True:
|
while True:
|
||||||
authbooks = authbook_model.objects.using(db_alias).filter(is_latest=False)[:20]
|
authbooks = authbook_model.objects.using(db_alias).filter(is_latest=False)[:1000]
|
||||||
if not authbooks:
|
if not authbooks:
|
||||||
break
|
break
|
||||||
historys = []
|
historys = []
|
||||||
|
Loading…
Reference in New Issue
Block a user