mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 12:05:54 +00:00
针对已被移除的路由规则功能的。根据 botmgr.py:74-100 中的注释,路由规则已被移除,Bot 现在直接绑定到 Pipeline 或 Workflow。
This commit is contained in:
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
import uuid
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Any, Optional
|
||||
from typing import Optional
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ class DBMigrateWorkflowTables(migration.DBMigration):
|
||||
# Update bots table: add binding_type column (default to 'pipeline' for backward compatibility)
|
||||
# Check if column exists first (SQLite doesn't support IF NOT EXISTS for columns)
|
||||
try:
|
||||
result = await self.ap.persistence_mgr.execute_async(
|
||||
await self.ap.persistence_mgr.execute_async(
|
||||
sqlalchemy.text("SELECT binding_type FROM bots LIMIT 1")
|
||||
)
|
||||
except Exception:
|
||||
|
||||
@@ -1136,7 +1136,7 @@ class DebugWorkflowExecutor(WorkflowExecutor):
|
||||
node_state.inputs = inputs
|
||||
debug_state.add_log(
|
||||
'debug',
|
||||
f'Node inputs resolved',
|
||||
'Node inputs resolved',
|
||||
node_id=node.id,
|
||||
data={'inputs': self._safe_serialize(inputs)}
|
||||
)
|
||||
@@ -1223,9 +1223,6 @@ class DebugWorkflowExecutor(WorkflowExecutor):
|
||||
return {'completed': True}
|
||||
|
||||
# Execute single node
|
||||
node_map = {node.id: node for node in workflow.nodes}
|
||||
edge_map = self._build_edge_map(workflow.edges)
|
||||
|
||||
debug_state.current_node_id = next_node.id
|
||||
await self._execute_debug_node(next_node, context, debug_state, workflow.settings.max_retries)
|
||||
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
"""
|
||||
RuntimeBot.resolve_pipeline_uuid and _match_operator unit tests
|
||||
|
||||
NOTE: These tests are for the deprecated routing rules feature.
|
||||
Routing rules have been removed in favor of direct Pipeline/Workflow binding.
|
||||
These tests are kept for backward compatibility but are skipped.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import Mock
|
||||
|
||||
|
||||
# Mark all tests in this module as skipped since routing rules are deprecated
|
||||
pytestmark = pytest.mark.skip(reason="Routing rules feature has been removed. Bots now directly bind to Pipeline/Workflow.")
|
||||
|
||||
|
||||
class TestMatchOperator:
|
||||
"""Test the _match_operator static method."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user