Sha256: 31656fc61effdadf5d448c496fe8167696be32b5fa032a366fd127ddd1b8b4d8
Contents?: true
Size: 426 Bytes
Versions: 3
Compression:
Stored size: 426 Bytes
Contents
namespace :searchcraft do desc "Refresh searchcraft materialized views" task refresh: :environment do SearchCraft::Builder.rebuild_any_if_changed! require "benchmark" SearchCraft.config.explicit_model_class_names.each do |model_class_name| klass = model_class_name.constantize puts "Refreshing materialized views for #{klass.name}" puts Benchmark.measure { klass.refresh! } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
searchcraft-0.4.2 | lib/tasks/refresh.rake |
searchcraft-0.4.1 | lib/tasks/refresh.rake |
searchcraft-0.4.0 | lib/tasks/refresh.rake |