mirror of https://github.com/jumpserver/jumpserver
perf: update migrations
parent
0fd5a2c4d9
commit
6874a422a0
|
@ -359,6 +359,8 @@ class GatherAccountsManager(AccountBasePlaybookManager):
|
||||||
self.update_gathered_account(ori_account, d)
|
self.update_gathered_account(ori_account, d)
|
||||||
risk_analyser.analyse_risk(asset, ori_account, d)
|
risk_analyser.analyse_risk(asset, ori_account, d)
|
||||||
|
|
||||||
|
self.create_gathered_account.finish()
|
||||||
|
self.update_gathered_account.finish()
|
||||||
self.update_gather_accounts_status(asset)
|
self.update_gather_accounts_status(asset)
|
||||||
GatheredAccount.sync_accounts(gathered_accounts, self.is_sync_account)
|
GatheredAccount.sync_accounts(gathered_accounts, self.is_sync_account)
|
||||||
# 因为有 bulk create, bulk update, 所以这里需要 sleep 一下,等待数据同步
|
# 因为有 bulk create, bulk update, 所以这里需要 sleep 一下,等待数据同步
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Generated by Django 4.1.13 on 2024-12-02 02:07
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("accounts", "0016_alter_accountrisk_status_and_more"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="accountrisk",
|
||||||
|
name="status",
|
||||||
|
field=models.CharField(
|
||||||
|
blank=True,
|
||||||
|
choices=[("0", "Pending"), ("1", "Confirmed"), ("2", "Ignored")],
|
||||||
|
default="0",
|
||||||
|
max_length=32,
|
||||||
|
verbose_name="Status",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="gatheredaccount",
|
||||||
|
name="status",
|
||||||
|
field=models.CharField(
|
||||||
|
blank=True,
|
||||||
|
choices=[("0", "Pending"), ("1", "Confirmed"), ("2", "Ignored")],
|
||||||
|
default="0",
|
||||||
|
max_length=32,
|
||||||
|
verbose_name="Status",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -76,9 +76,9 @@ class Language(models.TextChoices):
|
||||||
|
|
||||||
|
|
||||||
class ConfirmOrIgnore(models.TextChoices):
|
class ConfirmOrIgnore(models.TextChoices):
|
||||||
pending = '', _('Pending')
|
pending = '0', _('Pending')
|
||||||
confirmed = 'confirmed', _('Confirmed')
|
confirmed = '1', _('Confirmed')
|
||||||
ignored = 'ignored', _('Ignored')
|
ignored = '2', _('Ignored')
|
||||||
|
|
||||||
|
|
||||||
COUNTRY_CALLING_CODES = get_country_phone_choices()
|
COUNTRY_CALLING_CODES = get_country_phone_choices()
|
||||||
|
|
Loading…
Reference in New Issue