perf: 优化账号任务

This commit is contained in:
ibuler
2023-02-21 13:00:04 +08:00
parent b49b7125b2
commit e67a876513
21 changed files with 147 additions and 118 deletions

View File

@@ -9,7 +9,7 @@ def quickstart_automation_by_snapshot(task_name, tp, task_snapshot=None):
data = generate_automation_execution_data(task_name, tp, task_snapshot)
pk = data['id']
if AutomationExecution.objects.exists(id=pk):
if AutomationExecution.objects.filter(id=pk).exists():
data['id'] = str(uuid.uuid4())
execution = AutomationExecution.objects.create(