Skip to content

Commit d317a25

Browse files
committed
🔧 make publish revocations timeout configurable
1 parent 7dfb550 commit d317a25

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/routes/revocation.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 Optional
34

45
from aries_cloudcontroller import IssuerCredRevRecord, RevRegWalletUpdatedResult
@@ -23,6 +24,9 @@
2324

2425
router = APIRouter(prefix="/v1/issuer/credentials", tags=["revocation"])
2526

27+
# Config for /publish-revocations
28+
publish_revocations_timeout_seconds = int(os.getenv("PUBLISH_REVOCATIONS_TIMEOUT", 60))
29+
2630

2731
@router.post("/revoke", summary="Revoke a Credential (if revocable)")
2832
async def revoke_credential(
@@ -209,7 +213,7 @@ async def publish_revocations(
209213
field_name="state",
210214
expected_value="transaction_acked",
211215
logger=bound_logger,
212-
max_attempts=30,
216+
max_attempts=publish_revocations_timeout_seconds,
213217
retry_delay=1,
214218
)
215219
except asyncio.TimeoutError as e:

0 commit comments

Comments
 (0)