mirror of https://github.com/jumpserver/jumpserver
perf: 优化迁移账号,性能提高50倍
parent
7939ef34b0
commit
6e3d950e23
|
@ -18,7 +18,7 @@ def migrate_old_authbook_to_history(apps, schema_editor):
|
|||
|
||||
print()
|
||||
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:
|
||||
break
|
||||
historys = []
|
||||
|
|
Loading…
Reference in New Issue