mirror of https://github.com/zulip/zulip.git
outgoing_http: Support fractional-second timeouts.
This commit is contained in:
parent
1cba83f9c5
commit
c7e92ee2f3
|
@ -9,7 +9,7 @@ class OutgoingSession(requests.Session):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
role: str,
|
role: str,
|
||||||
timeout: int,
|
timeout: float,
|
||||||
headers: Optional[Dict[str, str]] = None,
|
headers: Optional[Dict[str, str]] = None,
|
||||||
max_retries: Optional[Union[int, Retry]] = None,
|
max_retries: Optional[Union[int, Retry]] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -29,9 +29,9 @@ class OutgoingSession(requests.Session):
|
||||||
|
|
||||||
class OutgoingHTTPAdapter(requests.adapters.HTTPAdapter):
|
class OutgoingHTTPAdapter(requests.adapters.HTTPAdapter):
|
||||||
role: str
|
role: str
|
||||||
timeout: int
|
timeout: float
|
||||||
|
|
||||||
def __init__(self, role: str, timeout: int, max_retries: Optional[Retry]) -> None:
|
def __init__(self, role: str, timeout: float, max_retries: Optional[Retry]) -> None:
|
||||||
self.role = role
|
self.role = role
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
super().__init__(max_retries=max_retries)
|
super().__init__(max_retries=max_retries)
|
||||||
|
|
Loading…
Reference in New Issue