Sha256: d191a4d5fd6de458febef96bee7e98d4993ffa327d5e2b32d0abc255eceb21bf
Contents?: true
Size: 833 Bytes
Versions: 17
Compression:
Stored size: 833 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::Hooks::GuardPresence def self.call(configuration = nil, stream = STDERR) new(configuration, stream).call end def initialize(configuration = nil, stream = STDERR) @configuration = configuration || ThinkingSphinx::Configuration.instance @stream = stream end def call return if files.empty? stream.puts "WARNING: The following indexing guard files exist:" files.each do |file| stream.puts " * #{file}" end stream.puts <<-TXT These files indicate indexing is already happening. If that is not the case, these files should be deleted to ensure all indices can be processed. TXT end private attr_reader :configuration, :stream def files @files ||= Dir["#{configuration.indices_location}/ts-*.tmp"] end end
Version data entries
17 entries across 17 versions & 1 rubygems