perf: Postgresql add ssl mode

This commit is contained in:
feng
2024-09-13 17:44:26 +08:00
committed by Bryan
parent 1cb00b1db4
commit 85129da942
46 changed files with 2950 additions and 2146 deletions

View File

@@ -32,11 +32,9 @@ def task_activity_callback(self, pid, trigger, tp, *args, **kwargs):
verbose_name=_('Account execute automation'),
activity_callback=task_activity_callback,
description=_(
"""
Unified execution entry for account automation tasks: when the system performs tasks
"""Unified execution entry for account automation tasks: when the system performs tasks
such as account push, password change, account verification, account collection,
and gateway account verification, all tasks are executed through this unified entry
"""
and gateway account verification, all tasks are executed through this unified entry"""
)
)
def execute_account_automation_task(pid, trigger, tp):
@@ -66,9 +64,7 @@ def record_task_activity_callback(self, record_ids, *args, **kwargs):
verbose_name=_('Execute automation record'),
activity_callback=record_task_activity_callback,
description=_(
"""
When manually executing password change records, this task is used
"""
"""When manually executing password change records, this task is used"""
)
)
def execute_automation_record_task(record_ids, tp):
@@ -99,16 +95,14 @@ def execute_automation_record_task(record_ids, tp):
@shared_task(
verbose_name=_('Clean change secret and push record period'),
description=_(
"""
The system will periodically clean up unnecessary password change and push records,
"""The system will periodically clean up unnecessary password change and push records,
including their associated change tasks, execution logs, assets, and accounts. When any
of these associated items are deleted, the corresponding password change and push records
become invalid. Therefore, to maintain a clean and efficient database, the system will
clean up expired records at 2 a.m daily, based on the interval specified by
PERM_EXPIRED_CHECK_PERIODIC in the config.txt configuration file. This periodic cleanup
mechanism helps free up storage space and enhances the security and overall performance
of data management
"""
of data management"""
)
)
@register_as_period_task(crontab=CRONTAB_AT_AM_THREE)

View File

@@ -26,9 +26,7 @@ def task_activity_callback(self, pid, trigger, *args, **kwargs):
verbose_name=_('Execute account backup plan'),
activity_callback=task_activity_callback,
description=_(
"""
When performing scheduled or manual account backups, this task is used
"""
"When performing scheduled or manual account backups, this task is used"
)
)
def execute_account_backup_task(pid, trigger, **kwargs):

View File

@@ -16,9 +16,7 @@ __all__ = [
verbose_name=_('Push accounts to assets'),
activity_callback=lambda self, account_ids, *args, **kwargs: (account_ids, None),
description=_(
"""
When creating or modifying an account requires account push, this task is executed
"""
"When creating or modifying an account requires account push, this task is executed"
)
)
def push_accounts_to_assets_task(account_ids, params=None):

View File

@@ -25,10 +25,8 @@ __all__ = ['remove_accounts_task']
verbose_name=_('Remove account'),
activity_callback=lambda self, gather_account_ids, *args, **kwargs: (gather_account_ids, None),
description=_(
"""
When clicking "Sync deletion" in 'Console - Gather Account - Gathered accounts' this
task will be executed
"""
"""When clicking "Sync deletion" in 'Console - Gather Account - Gathered accounts' this
task will be executed"""
)
)
def remove_accounts_task(gather_account_ids):
@@ -51,12 +49,10 @@ def remove_accounts_task(gather_account_ids):
@shared_task(
verbose_name=_('Clean historical accounts'),
description=_(
"""
Each time an asset account is updated, a historical account is generated, so it is
"""Each time an asset account is updated, a historical account is generated, so it is
necessary to clean up the asset account history. The system will clean up excess account
records at 2 a.m. daily based on the configuration in the "System settings - Features -
Account storage - Record limit
"""
Account storage - Record limit"""
)
)
@register_as_period_task(crontab=CRONTAB_AT_AM_TWO)

View File

@@ -11,10 +11,8 @@ from orgs.utils import tmp_to_root_org, tmp_to_org
verbose_name=_('Template sync info to related accounts'),
activity_callback=lambda self, template_id, *args, **kwargs: (template_id, None),
description=_(
"""
When clicking 'Sync new secret to accounts' in 'Console - Account - Templates -
Accounts' this task will be executed
"""
"""When clicking 'Sync new secret to accounts' in 'Console - Account - Templates -
Accounts' this task will be executed"""
)
)
def template_sync_related_accounts(template_id, user_id=None):

View File

@@ -31,10 +31,7 @@ def sync_instance(instance):
@shared_task(
verbose_name=_('Sync secret to vault'),
description=_(
"""
When clicking 'Sync' in 'System Settings - Features - Account Storage' this task will
be executed
"""
"When clicking 'Sync' in 'System Settings - Features - Account Storage' this task will be executed"
)
)
def sync_secret_to_vault():

View File

@@ -50,9 +50,7 @@ def verify_accounts_connectivity_util(accounts, task_name):
verbose_name=_('Verify asset account availability'),
activity_callback=lambda self, account_ids, *args, **kwargs: (account_ids, None),
description=_(
"""
When clicking 'Test' in 'Console - Asset details - Accounts' this task will be executed
"""
"When clicking 'Test' in 'Console - Asset details - Accounts' this task will be executed"
)
)
def verify_accounts_connectivity_task(account_ids):