You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 58ac7a1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
### 0.8.0 (Next)
2
2
3
-
*[#134](https://github.com/slack-ruby/slack-ruby-client/issues/134): Added `timeout` and `open_timeout` options to Web API - [@dblock](https://github.com/dblock).
3
+
*[#135](https://github.com/slack-ruby/slack-ruby-client/issues/135): Added `timeout` and `open_timeout` options to Web API - [@dblock](https://github.com/dblock).
4
+
*[#134](https://github.com/slack-ruby/slack-ruby-client/issues/134): Set `start_options[:request][:timeout]`, used with `rtm.start` in `Slack::RealTime::Client`, to 180 seconds - [@dblock](https://github.com/dblock).
5
+
*[#136](https://github.com/slack-ruby/slack-ruby-client/pull/136): Pass request options in web client calls - [@dblock](https://github.com/dblock).
open_timeout | Optional connection open timeout in seconds.
178
178
179
+
You can also pass request options, including `timeout` and `open_timeout` into individual calls.
180
+
181
+
```ruby
182
+
client.channels_list(request: { timeout:180 })
183
+
```
184
+
179
185
### RealTime Client
180
186
181
187
The Real Time Messaging API is a WebSocket-based API that allows you to receive events from Slack in real time and send messages as user.
@@ -266,7 +272,7 @@ token | Slack API token.
266
272
websocket_ping | The number of seconds that indicates how often the WebSocket should send ping frames, default is 30.
267
273
websocket_proxy | Connect via proxy, include `:origin` and `:headers`.
268
274
store_class | Local store class name, default is an in-memory `Slack::RealTime::Stores::Store`.
269
-
start_options | Options to pass into `rtm.start`, default is `{}`.
275
+
start_options | Options to pass into `rtm.start`, default is `{ request: { timeout: 180 } }`.
270
276
logger | Optional `Logger` instance that logs RealTime requests and socket data.
271
277
272
278
Note that the RealTime client uses a Web client to obtain the WebSocket URL via [rtm.start](https://api.slack.com/methods/rtm.start). While `token` and `logger` options are passed down from the RealTime client, you may also configure Web client options via `Slack::Web::Client.configure` as described above.
@@ -300,12 +306,16 @@ See a fully working example in [examples/hi_real_time_and_web](examples/hi_real_
300
306
301
307
### Large Team Considerations
302
308
303
-
For large teams of thousands of members you may also want to increase the default web client timeout, since `rtm.start` downloads a large amount of data.
309
+
The `rtm.start` call downloads a large amount of data. For large teams, consider reducing the amount of unnecessary data downloaded with `start_options`. You may also want to increase the default timeoutof 180 seconds.
304
310
305
311
```ruby
306
-
Slack::Web::Client.config do |config|
307
-
config.timeout =5
308
-
config.open_timeout =5
312
+
Slack::RealTime::Client.config do |config|
313
+
# Return timestamp only for latest message object of each channel.
Copy file name to clipboardExpand all lines: UPGRADING.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,28 @@
1
1
Upgrading Slack-Ruby-Client
2
2
===========================
3
3
4
+
### Upgrading to >= 0.8.0
5
+
6
+
The default timeout for `rtm.start` has been increased from 60 to 180 seconds via `Slack::RealTime::Client.config.start_options[:request][:timeout]`. If you're explicitly setting `start_options` in your application, preserve the value by merging settings instead of replacing the entire `start_options` value.
0 commit comments