Skip to content

Commit

Permalink
🩹 Increase retry_delay in waiting for issuer onboarding
Browse files Browse the repository at this point in the history
 And 🔧 make configurable
  • Loading branch information
ff137 committed Feb 3, 2025
1 parent c90dd47 commit 8de443f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/services/onboarding/util/register_issuer_did.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
set_endorser_info,
set_endorser_role,
)
from shared import ACAPY_ENDORSER_ALIAS, ISSUER_DID_ENDORSE_TIMEOUT
from shared import (
ACAPY_ENDORSER_ALIAS,
ISSUER_DID_ENDORSE_TIMEOUT,
ISSUER_WAIT_RETRY_DELAY,
)


async def create_connection_with_endorser(
Expand Down Expand Up @@ -209,7 +213,7 @@ async def wait_endorser_connection_completed(
invitation_msg_id: str,
logger: Logger,
max_attempts: int = 30,
retry_delay: float = 0.5,
retry_delay: float = ISSUER_WAIT_RETRY_DELAY,
) -> ConnRecord:
attempt = 0

Expand Down Expand Up @@ -256,7 +260,7 @@ async def wait_transactions_endorsed(
issuer_connection_id: str,
logger: Logger,
max_attempts: int = ISSUER_DID_ENDORSE_TIMEOUT,
retry_delay: float = 1.0,
retry_delay: float = ISSUER_WAIT_RETRY_DELAY,
) -> None:
attempt = 0

Expand Down
1 change: 1 addition & 0 deletions shared/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
REGISTRY_CREATION_TIMEOUT = int(os.getenv("REGISTRY_CREATION_TIMEOUT", "60"))
REGISTRY_SIZE = int(os.getenv("REGISTRY_SIZE", "32767"))
ISSUER_DID_ENDORSE_TIMEOUT = int(os.getenv("ISSUER_DID_ENDORSE_TIMEOUT", "60"))
ISSUER_WAIT_RETRY_DELAY = float(os.getenv("ISSUER_WAIT_RETRY_DELAY", "3.0"))

# NATS
NATS_SERVER = os.getenv("NATS_SERVER", "nats://nats:4222")
Expand Down

0 comments on commit 8de443f

Please sign in to comment.