diff --git a/Gemfile.lock b/Gemfile.lock index 04fb9f86..ccb7da86 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GIT PATH remote: . specs: - job-iteration (1.4.0) + job-iteration (1.4.1) activejob (>= 5.2) GEM diff --git a/lib/job-iteration.rb b/lib/job-iteration.rb index 42fd6a10..ba524cc0 100644 --- a/lib/job-iteration.rb +++ b/lib/job-iteration.rb @@ -13,9 +13,13 @@ module JobIteration extend self - attr_accessor :logger + attr_writer :logger - self.logger = ActiveJob::Base.logger + class << self + def logger + @logger || ActiveJob::Base.logger + end + end # Use this to _always_ interrupt the job after it's been running for more than N seconds. # @example diff --git a/lib/job-iteration/version.rb b/lib/job-iteration/version.rb index 8c94ff51..d8b5d5f2 100644 --- a/lib/job-iteration/version.rb +++ b/lib/job-iteration/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module JobIteration - VERSION = "1.4.0" + VERSION = "1.4.1" end