aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorCristian Bica <cristian.bica@gmail.com>2014-09-04 08:08:06 +0300
committerCristian Bica <cristian.bica@gmail.com>2014-09-04 08:08:06 +0300
commit15ddf60e05f5995b1aaf8d8cecfa2354005cc035 (patch)
tree9b18104849bc351858fb4461babd9fe66696de51 /activejob
parent1e237b4e44b7de564c7d6b331dd2f2243c4113fd (diff)
downloadrails-15ddf60e05f5995b1aaf8d8cecfa2354005cc035.tar.gz
rails-15ddf60e05f5995b1aaf8d8cecfa2354005cc035.tar.bz2
rails-15ddf60e05f5995b1aaf8d8cecfa2354005cc035.zip
Rename remaining :in / :at to :wait / :wait_until
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/configured_job.rb2
-rw-r--r--activejob/lib/active_job/enqueuing.rb16
2 files changed, 8 insertions, 10 deletions
diff --git a/activejob/lib/active_job/configured_job.rb b/activejob/lib/active_job/configured_job.rb
index 61efc9b09e..979280b910 100644
--- a/activejob/lib/active_job/configured_job.rb
+++ b/activejob/lib/active_job/configured_job.rb
@@ -2,8 +2,6 @@ module ActiveJob
class ConfiguredJob #:nodoc:
def initialize(job_class, options={})
@options = options
- @options[:in] = @options.delete(:wait) if @options[:wait]
- @options[:at] = @options.delete(:wait_until) if @options[:wait_until]
@job_class = job_class
end
diff --git a/activejob/lib/active_job/enqueuing.rb b/activejob/lib/active_job/enqueuing.rb
index 32453930cc..e8bc44cbc4 100644
--- a/activejob/lib/active_job/enqueuing.rb
+++ b/activejob/lib/active_job/enqueuing.rb
@@ -27,8 +27,8 @@ module ActiveJob
# you can ask Active Job to retry performing your job.
#
# ==== Options
- # * <tt>:in</tt> - Enqueues the job with the specified delay
- # * <tt>:at</tt> - Enqueues the job at the time specified
+ # * <tt>:wait</tt> - Enqueues the job with the specified delay
+ # * <tt>:wait_until</tt> - Enqueues the job at the time specified
# * <tt>:queue</tt> - Enqueues the job on the specified queue
#
# ==== Examples
@@ -48,19 +48,19 @@ module ActiveJob
# Equeue the job to be performed by the queue adapter.
#
# ==== Options
- # * <tt>:in</tt> - Enqueues the job with the specified delay
- # * <tt>:at</tt> - Enqueues the job at the time specified
+ # * <tt>:wait</tt> - Enqueues the job with the specified delay
+ # * <tt>:wait_until</tt> - Enqueues the job at the time specified
# * <tt>:queue</tt> - Enqueues the job on the specified queue
#
# ==== Examples
#
# my_job_instance.enqueue
- # my_job_instance.enqueue in: 5.minutes
+ # my_job_instance.enqueue wait: 5.minutes
# my_job_instance.enqueue queue: :important
- # my_job_instance.enqueue at: Date.tomorrow.midnight
+ # my_job_instance.enqueue wait_until: Date.tomorrow.midnight
def enqueue(options={})
- self.scheduled_at = options[:in].seconds.from_now.to_f if options[:in]
- self.scheduled_at = options[:at].to_f if options[:at]
+ self.scheduled_at = options[:wait].seconds.from_now.to_f if options[:wait]
+ self.scheduled_at = options[:wait_until].to_f if options[:wait_until]
self.queue_name = self.class.queue_name_from_part(options[:queue]) if options[:queue]
run_callbacks :enqueue do
if self.scheduled_at