lib/good_job/poller.rb in good_job-1.8.0 vs lib/good_job/poller.rb in good_job-1.9.0

- old
+ new

@@ -14,11 +14,11 @@ }.freeze # @!attribute [r] instances # @!scope class # List of all instantiated Pollers in the current process. - # @return [Array<GoodJob:Poller>] + # @return [Array<GoodJob::Poller>] cattr_reader :instances, default: [], instance_reader: false # Creates GoodJob::Poller from a GoodJob::Configuration instance. # @param configuration [GoodJob::Configuration] # @return [GoodJob::Poller] @@ -83,10 +83,10 @@ # Invoked on completion of TimerTask task. # @!visibility private # @return [void] def timer_observer(time, executed_task, thread_error) GoodJob.on_thread_error.call(thread_error) if thread_error && GoodJob.on_thread_error.respond_to?(:call) - instrument("finished_timer_task", { result: executed_task, error: thread_error, time: time }) + ActiveSupport::Notifications.instrument("finished_timer_task", { result: executed_task, error: thread_error, time: time }) end private attr_reader :timer