Skip to content
Snippets Groups Projects
Commit 1fcd758b authored by maxwell's avatar maxwell
Browse files

removed the mutex, added rack fiber pool. this thing screams

parent 1e0e0bce
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ gem "bson_ext", "1.0.1" ...@@ -10,7 +10,7 @@ gem "bson_ext", "1.0.1"
gem "haml" gem "haml"
gem "devise", :git => "git://github.com/plataformatec/devise.git" gem "devise", :git => "git://github.com/plataformatec/devise.git"
gem 'roxml', :git => "git://github.com/Empact/roxml.git" gem 'roxml', :git => "git://github.com/Empact/roxml.git"
gem 'rack-fiber_pool', :require => 'rack/fiber_pool'
group :test do group :test do
gem 'rspec', '>= 2.0.0.beta.12' gem 'rspec', '>= 2.0.0.beta.12'
......
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)
use Rack::FiberPool
run Diaspora::Application run Diaspora::Application
...@@ -16,4 +16,5 @@ Diaspora::Application.configure do ...@@ -16,4 +16,5 @@ Diaspora::Application.configure do
# Don't care if the mailer can't send # Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = false
config.threadsafe!
end end
...@@ -43,4 +43,6 @@ Diaspora::Application.configure do ...@@ -43,4 +43,6 @@ Diaspora::Application.configure do
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found) # the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true config.i18n.fallbacks = true
config.threadsafe!
end end
...@@ -24,6 +24,8 @@ Diaspora::Application.configure do ...@@ -24,6 +24,8 @@ Diaspora::Application.configure do
# The :test delivery method accumulates sent emails in the # The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array. # ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test config.action_mailer.delivery_method = :test
config.threadsafe!
# Use SQL instead of Active Record's schema dumper when creating the test database. # Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper, # This is necessary if your schema can't be completely dumped by the schema dumper,
......
...@@ -24,7 +24,6 @@ class MessageHandler ...@@ -24,7 +24,6 @@ class MessageHandler
@queue.pop{ |query| @queue.pop{ |query|
case query.type case query.type
when :post when :post
puts Addressable::URI::parse(query.destination).inspect
http = EventMachine::HttpRequest.new(query.destination).post :timeout => TIMEOUT, :body =>{:xml => query.body} http = EventMachine::HttpRequest.new(query.destination).post :timeout => TIMEOUT, :body =>{:xml => query.body}
http.callback { process} http.callback { process}
when :get when :get
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment