Sha256: bce406c0523441312598d74aa6ac65387ebf16e27845d119dc1bd026cfe60d80
Contents?: true
Size: 372 Bytes
Versions: 28
Compression:
Stored size: 372 Bytes
Contents
require "benchmark" namespace :db do desc "Refreshes all materialized views e.g. audits. May take a while so only run overnight." task refresh_all_materialized_views: :environment do ms = Benchmark.ms do ActiveRecord::Base.connection.execute("SELECT refresh_all_matierialized_views();") end puts "Refreshing materialized views took #{ms}" end end
Version data entries
28 entries across 28 versions & 1 rubygems