diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-09-10 12:52:19 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-09-11 15:11:52 -0700 |
commit | 34b23e7110a3a13cf157608cefc9b5701017bf39 (patch) | |
tree | 1b4f9962bddde61a8f7239b8a49b06e4c04f3429 /railties/lib/rails/queueing.rb | |
parent | b4b5971ff73f3191be03644fa0c9951a930717d2 (diff) | |
download | rails-34b23e7110a3a13cf157608cefc9b5701017bf39.tar.gz rails-34b23e7110a3a13cf157608cefc9b5701017bf39.tar.bz2 rails-34b23e7110a3a13cf157608cefc9b5701017bf39.zip |
Action Mailer async flag is true by default using a Synchronous impl
Diffstat (limited to 'railties/lib/rails/queueing.rb')
-rw-r--r-- | railties/lib/rails/queueing.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/lib/rails/queueing.rb b/railties/lib/rails/queueing.rb index baf6811d3e..7cd755b0f7 100644 --- a/railties/lib/rails/queueing.rb +++ b/railties/lib/rails/queueing.rb @@ -35,6 +35,14 @@ module Rails class Queue < ::Queue end + class SynchronousQueue < ::Queue + def push(job) + job.run + end + alias << push + alias enq push + end + # In test mode, the Rails queue is backed by an Array so that assertions # can be made about its contents. The test queue provides a +jobs+ # method to make assertions about the queue's contents and a +drain+ |