Sha256: e6ffaee0b91d000fee23afb11eaa4b2bf3f0d1c56011644c679274accaf61665

Contents?: true

Size: 433 Bytes

Versions: 2

Compression:

Stored size: 433 Bytes

Contents

# frozen_string_literal: true

class ThinkingSphinx::Commands::ClearRealTime < ThinkingSphinx::Commands::Base
  def call
    options[:indices].each do |index|
      index.render
      Dir["#{index.path}.*"].each { |path| FileUtils.rm path }
    end

    FileUtils.rm_r(binlog_path) if File.exist?(binlog_path)
  end

  private

  def binlog_path
    configuration.searchd.binlog_path
  end

  def type
    'clear_realtime'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thinking-sphinx-5.5.1 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-5.5.0 lib/thinking_sphinx/commands/clear_real_time.rb