Sha256: ba40d096e15ffa0a3a844d40a1c16c439a523fbd58d71d4fe31e3ac0fbe6091a

Contents?: true

Size: 434 Bytes

Versions: 14

Compression:

Stored size: 434 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.exists?(binlog_path)
  end

  private

  def binlog_path
    configuration.searchd.binlog_path
  end

  def type
    'clear_realtime'
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
thinking-sphinx-5.4.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-5.3.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-5.2.1 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-5.2.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-5.1.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-5.0.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.4.1 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.4.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.3.2 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.3.1 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.3.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.2.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.1.0 lib/thinking_sphinx/commands/clear_real_time.rb
thinking-sphinx-4.0.0 lib/thinking_sphinx/commands/clear_real_time.rb