MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / get_call_logic_config

Method get_call_logic_config

src/core/database.py:1472–1484  ·  view source on GitHub ↗

Get token call logic configuration.

(self)

Source from the content-addressed store, hash-verified

1470 await db.commit()
1471
1472 async def get_call_logic_config(self) -> CallLogicConfig:
1473 """Get token call logic configuration."""
1474 async with self._connect() as db:
1475 db.row_factory = aiosqlite.Row
1476 cursor = await db.execute("SELECT * FROM call_logic_config WHERE id = 1")
1477 row = await cursor.fetchone()
1478 if row:
1479 row_dict = dict(row)
1480 mode = row_dict.get("call_mode")
1481 if mode not in ("default", "polling"):
1482 row_dict["call_mode"] = "polling" if row_dict.get("polling_mode_enabled") else "default"
1483 return CallLogicConfig(**row_dict)
1484 return CallLogicConfig(call_mode="default", polling_mode_enabled=False)
1485
1486 async def update_call_logic_config(self, call_mode: str):
1487 """Update token call logic configuration."""

Callers 2

get_call_logic_configFunction · 0.80

Calls 2

_connectMethod · 0.95
CallLogicConfigClass · 0.85

Tested by

no test coverage detected