Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Re-introduce the extended timeouts

This reverts commit 2a56869.
  • Loading branch information...
commit 6082e3751fc88597a298d96dff34487a0f74878a 1 parent 2a56869
Phil Oye authored
Showing with 5 additions and 2 deletions.
  1. +3 −1 app.rb
  2. +2 −1  public/js/script.js
4 app.rb
View
@@ -33,7 +33,9 @@ def future? (date, timezone)
get '/events.json' do
response.headers['Cache-Control'] = 'public, max-age=60'
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.each do |e|
tix_remaining = e['capacity'].to_i - e['attendees'].length.to_i
3  public/js/script.js
View
@@ -66,7 +66,8 @@ function loadEvents() {
$holder.empty();
$("#loading").fadeOut('fast');
$holder.after("<div id='error'>The ticketing system seems down, try again later?</div>");
- }
+ },
+ timeout: 300000
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.