Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Swapped EM:HttpRequest in for Net::HTTP.
  • Loading branch information
dave committed Oct 29, 2010
1 parent 30b16be commit eae235d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/enigmamachine/models/video.rb
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit eae235d

Please sign in to comment.