Skip to content

Commit db6d48b

Browse files
committed
🔧 make publish revocations timeout configurable
1 parent 520ca8c commit db6d48b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/routes/issuer.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
import os
23
from typing import List, Optional
34
from uuid import UUID
45

@@ -41,6 +42,9 @@
4142

4243
router = APIRouter(prefix="/v1/issuer/credentials", tags=["issuer"])
4344

45+
# Config for /publish-revocations
46+
publish_revocations_timeout_seconds = int(os.getenv("PUBLISH_REVOCATIONS_TIMEOUT", 60))
47+
4448

4549
@router.post("", summary="Send Holder a Credential", response_model=CredentialExchange)
4650
async def send_credential(
@@ -672,7 +676,7 @@ async def publish_revocations(
672676
field_name="state",
673677
expected_value="transaction_acked",
674678
logger=bound_logger,
675-
max_attempts=45,
679+
max_attempts=publish_revocations_timeout_seconds,
676680
retry_delay=1,
677681
)
678682
except asyncio.TimeoutError as e:

0 commit comments

Comments
 (0)