fix: bypass pipeline_submit, create tasks directly in cockpit
This commit is contained in:
parent
40afce18e7
commit
28820a0b29
@ -358,14 +358,15 @@ if action == 'send_message':
|
|||||||
title = intent.get('title', '') or message_text[:100]
|
title = intent.get('title', '') or message_text[:100]
|
||||||
task_params = {'description': intent.get('description', ''), 'input_text': message_text}
|
task_params = {'description': intent.get('description', ''), 'input_text': message_text}
|
||||||
try:
|
try:
|
||||||
result = await pipeline_submit(org_id, 'sdlc_general', uid, title, task_params)
|
# Direct task creation (bypass pipeline_submit to avoid executor issues)
|
||||||
rd = json.loads(result)
|
task_id = getID()
|
||||||
if rd.get('success'):
|
await sor.C('pipeline_tasks', {
|
||||||
task_id = rd.get('task_id', '')
|
'id': task_id, 'tenant_id': org_id, 'pipeline_id': 'sdlc_general',
|
||||||
await _save_context(sor, uid, pid, iid)
|
'owner_id': uid, 'title': title, 'state': 'submitted',
|
||||||
agent_reply = f"✅ 任务「{title}」已提交({task_id}),产线开始执行。"
|
'params': json.dumps(task_params, ensure_ascii=False)
|
||||||
else:
|
})
|
||||||
agent_reply = f"任务提交失败:{rd.get('message', '未知错误')}"
|
await _save_context(sor, uid, pid, iid)
|
||||||
|
agent_reply = f"✅ 任务「{title}」已提交({task_id})。"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
agent_reply = f"任务提交失败:{str(e)[:200]}"
|
agent_reply = f"任务提交失败:{str(e)[:200]}"
|
||||||
elif intent_type == 'add_bug':
|
elif intent_type == 'add_bug':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user