mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-07 04:40:00 +08:00
🚨 auto fix by pre-commit hooks
This commit is contained in:
@@ -88,8 +88,7 @@ class FallbackRouter(BaseModelRouter):
|
||||
)
|
||||
raise e
|
||||
logger.warning(
|
||||
f"⚠️ 节点 '{m_name}' "
|
||||
f"错误 ({e.__class__.__name__}),触发故障转移..."
|
||||
f"⚠️ 节点 '{m_name}' 错误 ({e.__class__.__name__}),触发故障转移..."
|
||||
)
|
||||
errors.append(f"{m_name}({e.__class__.__name__})")
|
||||
except Exception as e:
|
||||
@@ -99,7 +98,7 @@ class FallbackRouter(BaseModelRouter):
|
||||
if all_nodes_bypassed and len(model_names) > 1:
|
||||
fallback_model = health_manager.get_best_fallback_route(model_names)
|
||||
logger.warning(
|
||||
f"⚠️ 路由组所有节点均已宕机!" f"强制放行 '{fallback_model}' 探活..."
|
||||
f"⚠️ 路由组所有节点均已宕机!强制放行 '{fallback_model}' 探活..."
|
||||
)
|
||||
try:
|
||||
async with await get_model_instance(
|
||||
|
||||
@@ -339,9 +339,7 @@ def _index_sql(table: str, columns: tuple[str, ...], dialect: Dialect) -> str |
|
||||
index_sql = _quote_identifier(_index_name(table, columns), dialect)
|
||||
columns_sql = ", ".join(_quote_identifier(column, dialect) for column in columns)
|
||||
if dialect in {"sqlite", "postgres"}:
|
||||
return (
|
||||
f"CREATE INDEX IF NOT EXISTS {index_sql} " f"ON {table_sql}({columns_sql})"
|
||||
)
|
||||
return f"CREATE INDEX IF NOT EXISTS {index_sql} ON {table_sql}({columns_sql})"
|
||||
if dialect == "mysql":
|
||||
return f"CREATE INDEX {index_sql} ON {table_sql}({columns_sql})"
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user