MCPcopy Create free account
hub / github.com/dot-agent/nextpy / close

Method close

nextpy/backend/state.py:1757–1766  ·  view source on GitHub ↗

Explicitly close the redis connection and connection_pool. It is necessary in testing scenarios to close between asyncio test cases to avoid having lingering redis connections associated with event loops that will be closed (each test case uses its own event loop).

(self)

Source from the content-addressed store, hash-verified

1755 await self.redis.delete(lock_key)
1756
1757 async def close(self):
1758 """Explicitly close the redis connection and connection_pool.
1759
1760 It is necessary in testing scenarios to close between asyncio test cases
1761 to avoid having lingering redis connections associated with event loops
1762 that will be closed (each test case uses its own event loop).
1763
1764 Note: Connections will be automatically reopened when needed.
1765 """
1766 await self.redis.close(close_connection_pool=True)
1767
1768
1769class ClientStorageBase:

Callers 15

_stream_runMethod · 0.80
genFunction · 0.80
geneachFunction · 0.80
__exit__Method · 0.80
_describe_imageMethod · 0.80
on_readyMethod · 0.80
_parse_supported_fileMethod · 0.80
_extract_text_by_pageMethod · 0.80

Calls

no outgoing calls

Tested by 10

test_set_and_get_stateFunction · 0.64
test_upload_fileFunction · 0.64
test_process_eventsFunction · 0.64
state_managerFunction · 0.64
state_manager_redisFunction · 0.64