GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Keep your users update about your site through twitter status updates when you deploy.
Clone URL: git://github.com/arya/capistrano_twitter.git
* twitter times out on open, not read, oops
Arya Asemanfar (author)
Thu Jun 05 20:05:00 -0700 2008
commit  5c67b29ee86af9639c617431b704bdd458c4f08a
tree    ee4405932f3b01416a96c5ce0f5bfa9721ad51b2
parent  d01dbc93f1316110def9c4a7e60fe3d1133979af
...
12
13
14
15
 
16
17
18
...
20
21
22
23
 
24
25
26
...
12
13
14
 
15
16
17
18
...
20
21
22
 
23
24
25
26
0
@@ -12,7 +12,7 @@ namespace :twitter do
0
     unless status.empty?
0
       
0
       http = Net::HTTP.new(TWITTER_UPDATE_URL.host, 80)
0
- http.read_timeout = 30
0
+ http.open_timeout = 20
0
       
0
       headers = {'Authorization' => 'Basic ' + ["#{twitter_user}:#{twitter_password}"].pack('m').delete("\r\n")}
0
       
0
@@ -20,7 +20,7 @@ namespace :twitter do
0
       begin
0
         http.send(:post, TWITTER_UPDATE_URL.path, body, headers)
0
       rescue Timeout::Error => e
0
- puts "Timeout after 30s: Seems like Twitter is down."
0
+ puts "Timeout after 20s: Seems like Twitter is down."
0
         puts "Use \"cap twitter:update\" to update Twitter status later w/o deploying"
0
       end
0
       # if an exception is thrown, let them see it, they're a developer (most likely)

Comments

    No one has commented yet.