aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/jobs
diff options
context:
space:
mode:
authorJerry D'Antonio <stumpjumper@gmail.com>2015-08-15 23:41:33 -0400
committerJerry D'Antonio <stumpjumper@gmail.com>2015-08-25 14:22:11 -0400
commit25a4155257cd463355bccb4330b0280e4110de9e (patch)
treeb58198818bb9ceadb4932e56f7c89c8b648ab4fb /activejob/test/jobs
parente6629257f4aecfa53fd1a1a2eae34aa33f637d79 (diff)
downloadrails-25a4155257cd463355bccb4330b0280e4110de9e.tar.gz
rails-25a4155257cd463355bccb4330b0280e4110de9e.tar.bz2
rails-25a4155257cd463355bccb4330b0280e4110de9e.zip
Initial implementation of ActiveJob AsyncAdapter.
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r--activejob/test/jobs/queue_as_job.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activejob/test/jobs/queue_as_job.rb b/activejob/test/jobs/queue_as_job.rb
new file mode 100644
index 0000000000..897aef52e5
--- /dev/null
+++ b/activejob/test/jobs/queue_as_job.rb
@@ -0,0 +1,10 @@
+require_relative '../support/job_buffer'
+
+class QueueAsJob < ActiveJob::Base
+ MY_QUEUE = :low_priority
+ queue_as MY_QUEUE
+
+ def perform(greeter = "David")
+ JobBuffer.add("#{greeter} says hello")
+ end
+end