perf: gather facts

This commit is contained in:
feng
2022-10-25 18:43:34 +08:00
parent a445e47f3d
commit 4dd4c29e12
12 changed files with 28 additions and 4669 deletions

View File

@@ -4,7 +4,6 @@ from django.utils.translation import ugettext_lazy as _
from common.db import fields
from common.const.choices import Trigger
from common.db.models import JMSBaseModel
from assets.tasks import execute_change_secret_automation
from assets.const import AutomationTypes, SecretType, SecretStrategy, SSHKeyStrategy
from .base import BaseAutomation
@@ -35,13 +34,6 @@ class ChangeSecretAutomation(BaseAutomation):
class Meta:
verbose_name = _("Change secret automation")
def get_register_task(self):
name = "automation_change_secret_strategy_period_{}".format(str(self.id)[:8])
task = execute_change_secret_automation.name
args = (str(self.id), Trigger.timing)
kwargs = {}
return name, task, args, kwargs
def to_attr_json(self):
attr_json = super().to_attr_json()
attr_json.update({