Skip to content

Commit

Permalink
Re-introduce the extended timeouts
Browse files Browse the repository at this point in the history
This reverts commit 2a56869.
  • Loading branch information
philoye committed Sep 19, 2011
1 parent 2a56869 commit 6082e37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app.rb
Expand Up @@ -33,7 +33,9 @@ def future? (date, timezone)
get '/events.json' do get '/events.json' do
response.headers['Cache-Control'] = 'public, max-age=60' response.headers['Cache-Control'] = 'public, max-age=60'
content_type :json content_type :json
events = JSON.parse(RestClient.get("https://" + ENV['PARISPICTURESCHOOL'] + "@secure.eventwax.com/api/events.json"))
request = RestClient::Request.new :url=>'https://parispictureschool:manon181206@secure.eventwax.com/api/events.json',:method=>:get, :timeout=>300000
events = JSON.parse request.execute
@events = [] @events = []
events.each do |e| events.each do |e|
tix_remaining = e['capacity'].to_i - e['attendees'].length.to_i tix_remaining = e['capacity'].to_i - e['attendees'].length.to_i
Expand Down
3 changes: 2 additions & 1 deletion public/js/script.js
Expand Up @@ -66,7 +66,8 @@ function loadEvents() {
$holder.empty(); $holder.empty();
$("#loading").fadeOut('fast'); $("#loading").fadeOut('fast');
$holder.after("<div id='error'>The ticketing system seems down, try again later?</div>"); $holder.after("<div id='error'>The ticketing system seems down, try again later?</div>");
} },
timeout: 300000
}); });
} }


Expand Down

0 comments on commit 6082e37

Please sign in to comment.