aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-27 10:30:03 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-27 10:30:03 +0100
commit4ed6167e985ed41311d979371813f22fcb0143b7 (patch)
treeee82a44517f747576a55ba0fc363e1e62182a3b3 /railties/lib/rails.rb
parentcf1a83c8816edeacd209725ae6c90846e9c6b4fc (diff)
parent7d1a42a0b17028662e24967a32c6a36849e48068 (diff)
downloadrails-4ed6167e985ed41311d979371813f22fcb0143b7.tar.gz
rails-4ed6167e985ed41311d979371813f22fcb0143b7.tar.bz2
rails-4ed6167e985ed41311d979371813f22fcb0143b7.zip
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'railties/lib/rails.rb')
-rw-r--r--railties/lib/rails.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb
index 945063e55c..59c3c56e59 100644
--- a/railties/lib/rails.rb
+++ b/railties/lib/rails.rb
@@ -22,6 +22,7 @@ end
module Rails
autoload :Info, 'rails/info'
autoload :InfoController, 'rails/info_controller'
+ autoload :Queueing, 'rails/queueing'
class << self
def application
@@ -37,6 +38,25 @@ module Rails
application.config
end
+ # Rails.queue is the application's queue. You can push a job onto
+ # the queue by:
+ #
+ # Rails.queue.push job
+ #
+ # A job is an object that responds to +run+. Queue consumers will
+ # pop jobs off of the queue and invoke the queue's +run+ method.
+ #
+ # Note that depending on your queue implementation, jobs may not
+ # be executed in the same process as they were created in, and
+ # are never executed in the same thread as they were created in.
+ #
+ # If necessary, a queue implementation may need to serialize your
+ # job for distribution to another process. The documentation of
+ # your queue will specify the requirements for that serialization.
+ def queue
+ application.queue
+ end
+
def initialize!
application.initialize!
end