lib/thinking_sphinx/deletion.rb in thinking-sphinx-3.1.4 vs lib/thinking_sphinx/deletion.rb in thinking-sphinx-3.2.0

- old
+ new

@@ -30,10 +30,23 @@ end end class RealtimeDeletion < ThinkingSphinx::Deletion def perform + return unless callbacks_enabled? + execute Riddle::Query::Delete.new(name, document_ids_for_keys).to_sql + end + + private + + def callbacks_enabled? + setting = configuration.settings['real_time_callbacks'] + setting.nil? || setting + end + + def configuration + ThinkingSphinx::Configuration.instance end end class PlainDeletion < ThinkingSphinx::Deletion def perform