diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-15 00:20:32 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | f256337aa3f47869ec31adb5fc7b2fdb73c396f9 (patch) | |
tree | 0e6e425c66a9eb4ce5d7e9b03f38ce2d723095bc /slack | |
parent | ecda1269f11efd861baa2b5cb3816e89af719aed (diff) | |
download | wee-slack-f256337aa3f47869ec31adb5fc7b2fdb73c396f9.tar.gz |
Rename slack_timeout to network_timeout
Diffstat (limited to 'slack')
-rw-r--r-- | slack/config.py | 4 | ||||
-rw-r--r-- | slack/slack_api.py | 2 | ||||
-rw-r--r-- | slack/slack_workspace.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/slack/config.py b/slack/config.py index 7228ed8..a1ab999 100644 --- a/slack/config.py +++ b/slack/config.py @@ -73,8 +73,8 @@ class SlackConfigSectionWorkspace: False, ) - self.slack_timeout = self._create_option( - "slack_timeout", + self.network_timeout = self._create_option( + "network_timeout", "timeout (in seconds) for network requests", 30, ) diff --git a/slack/slack_api.py b/slack/slack_api.py index 70a3aaa..463dce9 100644 --- a/slack/slack_api.py +++ b/slack/slack_api.py @@ -35,7 +35,7 @@ class SlackApi: response = await http_request( url, self._get_request_options(), - self.workspace.config.slack_timeout.value * 1000, + self.workspace.config.network_timeout.value * 1000, ) return json.loads(response) diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py index 0ddef89..fe1d5a6 100644 --- a/slack/slack_workspace.py +++ b/slack/slack_workspace.py @@ -88,12 +88,12 @@ class SlackWorkspace: "http_proxy_host": proxy.address, "http_proxy_port": proxy.port, "http_proxy_auth": (proxy.username, proxy.password), - "http_proxy_timeout": self.config.slack_timeout.value, + "http_proxy_timeout": self.config.network_timeout.value, } # TODO: Handle errors self.ws = create_connection( url, - self.config.slack_timeout.value, + self.config.network_timeout.value, sslopt=sslopt_ca_certs, **proxy_options, ) |