Strengthen is_connected with cached health probes.
Convert is_connected to a method that verifies backend liveness via TTL-cached ping (Redis) or bucket_exists (MinIO), with cache invalidation on connect/disconnect. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
fef9552cbf
commit
5149299c1b
@@ -16,8 +16,10 @@ class ConnectionAwareInterface(ABC):
|
||||
"""Disconnect from resource."""
|
||||
...
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def is_connected(self) -> bool:
|
||||
"""Check if connected to resource."""
|
||||
"""Return whether the adapter has an active, reachable connection.
|
||||
|
||||
Implementations may perform a cached network probe to verify liveness.
|
||||
"""
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user