Skip to content

Commit f1484d9

Browse files
committed
fix reviews comment
1 parent c372602 commit f1484d9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,11 @@ curl --location --request GET
341341
Use the `crypto_list` array; the `crypto` array exists only for backward compatibility. In the `crypto_list` array:
342342
- `name` is used when forming the endpoint for invoice creation requests,
343343
- `display_name` is the cryptocurrency human-readable format.
344+
345+
**Notes & caveats**
346+
347+
SHKeeper uses a short-lived in-memory TTL cache to speed up the /crypto endpoints. Cached data about available cryptocurrencies and node status may be slightly outdated (up to 60 seconds). In multi-process deployments, each instance keeps its own cache, which may cause minor differences between responses. The cache reduces short-term node or network fluctuations but may briefly delay reflecting real-time status changes.
348+
344349
<a name="invoice-creation"></a>
345350
#### 5.2.3. Invoice Creation
346351

@@ -860,13 +865,17 @@ Failure Response (invalid includes / no valid cryptos requested):
860865
"message": "No valid cryptos requested"
861866
}
862867
```
863-
Notes:
868+
869+
**Notes & caveats**
870+
864871
The response is always a plain JSON array, no extra envelope or metadata.
865872
The order of items is deterministic:
866873
If includes is provided → preserves order from request (valid entries only)
867874
If includes is absent → sorted alphabetically by name.
868875
Partial failures (e.g., RPC error for a coin) result in that coin being omitted; no new error fields are introduced.
869876

877+
SHKeeper uses a short-lived in-memory TTL cache to speed up the /crypto/balances endpoints. Cached data about available cryptocurrencies and node status may be slightly outdated (up to 60 seconds). In multi-process deployments, each instance keeps its own cache, which may cause minor differences between responses. The cache reduces short-term node or network fluctuations but may briefly delay reflecting real-time status changes.
878+
870879
<a name="receiving-callback"></a>
871880
### 5.3 Receiving callback
872881

shkeeper/services/balance_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def _build_balance(crypto_name: str, logger, app):
1818
amount_fiat = crypto_amount * Decimal(rate)
1919
server_status = crypto.getstatus()
2020
except Exception as e:
21-
logger.warning(f"_build_balance Exception: {e}")
21+
logger.exception(f"_build_balance exception for {crypto_name}")
2222
return None
2323
return {
2424
"name": crypto.crypto,

0 commit comments

Comments
 (0)