Fix rubocop

This commit is contained in:
KMY 2024-07-05 07:34:53 +09:00
parent 6b59ce6985
commit efa0c376bc
23 changed files with 32 additions and 32 deletions

View file

@ -28,8 +28,8 @@ class Importer::PublicStatusesIndexImporter < Importer::BaseImporter
def scope
to_index = Status.indexable.reorder(nil)
to_index = to_index.where('statuses.created_at >= ?', @from) if @from.present?
to_index = to_index.where('statuses.created_at < ?', @to) if @to.present?
to_index = to_index.where(statuses: { created_at: @from.. }) if @from.present?
to_index = to_index.where(statuses: { created_at: ...@to }) if @to.present?
to_index
end
end

View file

@ -17,8 +17,8 @@ class Importer::StatusesIndexImporter < Importer::BaseImporter
bulk = ActiveRecord::Base.connection_pool.with_connection do
to_index = index.adapter.default_scope.where(id: status_ids)
to_index = to_index.where('created_at >= ?', @from) if @from.present?
to_index = to_index.where('created_at < ?', @to) if @to.present?
to_index = to_index.where(created_at: @from..) if @from.present?
to_index = to_index.where(created_at: ...@to) if @to.present?
crutches = Chewy::Index::Crutch::Crutches.new index, to_index
to_index.map do |object|
# This is unlikely to happen, but the post may have been