chore: optimize asynchronous deletion performance of app related data (#6634)

This commit is contained in:
takatost
2024-07-24 18:15:03 +08:00
committed by GitHub
parent c112188207
commit 05141ede16
4 changed files with 217 additions and 85 deletions

View File

@@ -287,8 +287,12 @@ class AppService:
"""
db.session.delete(app)
db.session.commit()
# Trigger asynchronous deletion of app and related data
remove_app_and_related_data_task.delay(app.id)
remove_app_and_related_data_task.delay(
tenant_id=app.tenant_id,
app_id=app.id
)
def get_app_meta(self, app_model: App) -> dict:
"""