From 0690ad6f80efc2b35eb56ec1437bc19a500b2676 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Wed, 6 Sep 2023 12:14:16 -0400 Subject: [PATCH] refactor: default timeout as constant Signed-off-by: Daniel Bluhm --- aries_cloudagent/resolver/did_resolver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aries_cloudagent/resolver/did_resolver.py b/aries_cloudagent/resolver/did_resolver.py index cc50f10e63..4438fa1b9a 100644 --- a/aries_cloudagent/resolver/did_resolver.py +++ b/aries_cloudagent/resolver/did_resolver.py @@ -30,6 +30,8 @@ class DIDResolver: """did resolver singleton.""" + DEFAULT_TIMEOUT = 30 + def __init__(self, resolvers: Optional[List[BaseDIDResolver]] = None): """Create DID Resolver.""" self.resolvers = resolvers or [] @@ -64,7 +66,7 @@ async def _resolve( did, service_accept, ), - timeout if timeout is not None else 30, + timeout if timeout is not None else self.DEFAULT_TIMEOUT, ) return resolver, document except DIDNotFound: