Commit 1a5f62e2e7cc6f827229d1e883f4bdd7693ccaa0
- Diff rendering mode:
- inline
- side by side
coefficient.rb
(5 / 1)
|   | |||
| 4 | 4 | require 'json' | |
| 5 | 5 | require 'rack/utils' | |
| 6 | 6 | ||
| 7 | RestClient.proxy = "http://localhost:8118" | ||
| 7 | #RestClient.proxy = "http://localhost:8118" | ||
| 8 | 8 | set :host, 'localhost' | |
| 9 | 9 | disable :logging | |
| 10 | 10 | ||
| … | … | ||
| 211 | 211 | # by peer - SSL_connect | |
| 212 | 212 | # XXX: OpenSSL::SSL::SSLError - SSL_connect SYSCALL returned=5 | |
| 213 | 213 | # errno=0 state=SSLv2/v3 read server hello A: | |
| 214 | |||
| 215 | # sometimes, twitter generates | ||
| 216 | # x = JSON.parse('{"request":NULL,"error":"Twitter is down for maintenance. It will return in about an hour."}') | ||
| 217 | # which throws JSON::ParserError because NULL is different than null. | ||
| 214 | 218 | rescue RestClient::Exception => e | |
| 215 | 219 | req_status[site]['msg'] = "#{site}: error: #{e.http_code}" | |
| 216 | 220 | req_status[site]['error'] = true |

