Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion async_substrate_interface/async_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,6 @@ async def result_handler(

if subscription_result is not None:
reached = True
logger.info("REACHED!")
# Handler returned end result: unsubscribe from further updates
async with self.ws as ws:
await ws.unsubscribe(
Expand Down
5 changes: 3 additions & 2 deletions async_substrate_interface/utils/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ async def _create_if_not_exists(self, chain: str, table_name: str):
);
"""
)
await self._db.commit()
await self._db.execute(
f"""
CREATE TRIGGER IF NOT EXISTS prune_rows_trigger_{table_name} AFTER INSERT ON {table_name}
Expand All @@ -82,8 +83,8 @@ async def __call__(self, chain, other_self, func, args, kwargs) -> Optional[Any]
if not self._db:
_ensure_dir()
self._db = await aiosqlite.connect(CACHE_LOCATION)
table_name = _get_table_name(func)
local_chain = await self._create_if_not_exists(chain, table_name)
table_name = _get_table_name(func)
local_chain = await self._create_if_not_exists(chain, table_name)
key = pickle.dumps((args, kwargs or None))
try:
cursor: aiosqlite.Cursor = await self._db.execute(
Expand Down