diff options
Diffstat (limited to 'lib/active_job')
-rw-r--r-- | lib/active_job/enqueuing.rb | 2 | ||||
-rw-r--r-- | lib/active_job/logging.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/active_job/enqueuing.rb b/lib/active_job/enqueuing.rb index dafa2399c8..652de5521b 100644 --- a/lib/active_job/enqueuing.rb +++ b/lib/active_job/enqueuing.rb @@ -21,7 +21,7 @@ module ActiveJob # # Returns truthy if a job was scheduled. def enqueue_in(interval, *args) - enqueue_at(interval.from_now, *args) + enqueue_at(interval.seconds.from_now, *args) end # Enqueue a job to be performed at an explicit point in time. diff --git a/lib/active_job/logging.rb b/lib/active_job/logging.rb index 22748e3d5f..dc432679f8 100644 --- a/lib/active_job/logging.rb +++ b/lib/active_job/logging.rb @@ -12,7 +12,7 @@ module ActiveJob def enqueue_at(event) info "Enqueued #{event.payload[:job].name} to #{queue_name(event)} at #{enqueued_at(event)}" + args_info(event) end - + def perform(event) info "Performed #{event.payload[:job].name} to #{queue_name(event)}" + args_info(event) end @@ -25,7 +25,7 @@ module ActiveJob def args_info(event) event.payload[:args].any? ? ": #{event.payload[:args].inspect}" : "" end - + def enqueued_at(event) Time.at(event.payload[:timestamp]).utc end |