(
gateway: Gateway, path: str, body: Callable[[str], Mapping[str, JsonValue]], *, key: str | None = None
)
| 229 | |
| 230 | |
| 231 | def _send( |
| 232 | gateway: Gateway, path: str, body: Callable[[str], Mapping[str, JsonValue]], *, key: str | None = None |
| 233 | ) -> _Sent: |
| 234 | def attempt() -> _Sent: |
| 235 | nonce: Final = uuid.uuid4().hex |
| 236 | return _Sent(nonce, gateway.request("POST", path, body(nonce), key=key, headers=_FRESH_CONNECTION)) |
| 237 | |
| 238 | return eventually(attempt, lambda sent: _settled(sent.response.text), seconds=_WORKER_SYNC_SECONDS + 10) |
| 239 | |
| 240 | |
| 241 | @dataclass(frozen=True, slots=True) |
no test coverage detected