Supply a custom Faraday connection
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Read lib/slack/web/faraday/connection.rb around lines 16-25, then trace the files_upload path in lib/slack/web/api/endpoints/files.rb. Determine how callers can customize the Faraday connection's read timeout, and verify that files.upload can use the configured value without changing the default behavior.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I'm using the files.upload API, and started getting this error on a few files:
Faraday::TimeoutError Net::ReadTimeout
vendor/gems/ruby/2.1.0/gems/slack-ruby-client-0.2.1/lib/slack/web/faraday/request.rb:25:in `request'
vendor/gems/ruby/2.1.0/gems/slack-ruby-client-0.2.1/lib/slack/web/faraday/request.rb:10:in `post'
vendor/gems/ruby/2.1.0/gems/slack-ruby-client-0.2.1/lib/slack/web/api/endpoints/files.rb:70:in `files_upload'
The Net::ReadTimeout is coming from using Faraday's default adapter, ie net/http. That happens when the read_timeout is exceeded, which defaults to 60 seconds http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html#read_timeout
It's probably not great to go past this in general, but it might be expected for large files. It should be possible to customize the read_timeout when the Faraday::Connection is constructed, but I'm not seeing any way to customize this: https://github.com/dblock/slack-ruby-client/blob/e4c39604b6d00da1e419d63db68e30032f5a08e1/lib/slack/web/faraday/connection.rb#L16-L25
I realize I'm on an older version, so I will try upgrading but I don't think that will change anything. I'm still debugging the file in question to determine how big it is, but I figured I'd drop this in case anyone runs into similar.
- Vorherrschende Sprache
- Ruby
- Sterne
- 1.3k
- Forks
- 222
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 3
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus slack-ruby/slack-ruby-client
-
new feature question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
slack-ruby/slack-ruby-client#586 · 3 Kommentare ·
-
bug?
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
slack-ruby/slack-ruby-client#579 · 3 Kommentare ·
-
new feature web api
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
slack-ruby/slack-ruby-client#482 · 5 Kommentare ·
-
new feature
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
slack-ruby/slack-ruby-client#414 · 14 Kommentare ·
-
confirmed bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
slack-ruby/slack-ruby-client#409 · 5 Kommentare ·
Alle Issues in slack-ruby/slack-ruby-client
Ähnliche Issues
-
バグ
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
voxpupuli/puppet-epel#186 · 1 Kommentar ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OffenBug Frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
TheOdinProject/curriculum#31402 · 1 Kommentar ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100