Permalink
Browse files

Swapped EM:HttpRequest in for Net::HTTP.

  • Loading branch information...
1 parent 30b16be commit eae235d23b42fd3c23a8c31e3a0814d8de4f4855 dave committed Oct 29, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/enigmamachine/models/video.rb
@@ -215,10 +215,7 @@ def ffmpeg(task)
# a GET request to the video's callback_url.
#
def notify_complete
- begin
- Net::HTTP.get(URI.parse(video.callback_url)) unless callback_url.nil?
- rescue
- end
+ EventMachine::HttpRequest.new(callback_url).get :timeout => 10 unless callback_url.nil?
end
# Downloads a video from a remote location via HTTP
@@ -229,6 +226,7 @@ def do_download
http = EventMachine::HttpRequest.new(file).get :timeout => 10
http.stream do |data|
+ puts "what is status?: " + http.response_header.status.to_s
File.open(file_to_encode, 'a') {|f| f.write(data) }
end

0 comments on commit eae235d

Please sign in to comment.