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

Version Path
renalware-core-2.0.20 lib/tasks/db.rake
renalware-core-2.0.18 lib/tasks/db.rake
renalware-core-2.0.17 lib/tasks/db.rake
renalware-core-2.0.16 lib/tasks/db.rake
renalware-core-2.0.15 lib/tasks/db.rake
renalware-core-2.0.14 lib/tasks/db.rake
renalware-core-2.0.13 lib/tasks/db.rake
renalware-core-2.0.12 lib/tasks/db.rake