reserve_fraud_call
- # remaining_ms = provider_ms =
- def reserve_fraud_call(request):
- deadline = request.child_deadline(
- maximum_ms=1000,
- reserve_ms=,
- )
- if not deadline.can_start_call():
- return deadline, None
- permit =
- def evaluate_risk(assessment, request, permit, deadline):
- with permit:
- cancellation=
- Child deadline420 ms, capped at 1000
- Caller420 ms of 500 left
- ProviderStill running 480 ms
Checkout, fraud, provider
Checkout calls fraud with a child deadline. Fraud calls the provider only when a permit was acquired. Cancellation is what stops the provider when checkout is out of time.
Provider stopped
Live metrics
ReadyCheckout calls Fraud Service with a child deadline. Leftover provider work should stop when that deadline is spent.
Metric definitions
| Metric | Value | What it means |
|---|---|---|
| Child deadline | 420 ms | min(1000, time left minus the reserve). |
| Caller | 420 ms | How long checkout waits. It should finish inside the time it had left. |
| Still running | 480 ms | Provider work after checkout returns. Pass when this is 0. |
| Permit | acquired | A missing permit defers the call. That is not the same as stopping it. |
480 ms
420 ms