Skip to content

Commit

Permalink
refactor: default timeout as constant
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bluhm <[email protected]>
  • Loading branch information
dbluhm committed Sep 6, 2023
1 parent 33d5fb5 commit 6ea611f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aries_cloudagent/resolver/did_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6ea611f

Please sign in to comment.