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.41 lib/tasks/db.rake
renalware-core-2.0.40 lib/tasks/db.rake
renalware-core-2.0.39 lib/tasks/db.rake
renalware-core-2.0.38 lib/tasks/db.rake
renalware-core-2.0.37 lib/tasks/db.rake
renalware-core-2.0.36 lib/tasks/db.rake
renalware-core-2.0.35 lib/tasks/db.rake
renalware-core-2.0.34 lib/tasks/db.rake
renalware-core-2.0.33 lib/tasks/db.rake
renalware-core-2.0.32 lib/tasks/db.rake
renalware-core-2.0.31 lib/tasks/db.rake
renalware-core-2.0.30 lib/tasks/db.rake
renalware-core-2.0.28 lib/tasks/db.rake
renalware-core-2.0.27 lib/tasks/db.rake
renalware-core-2.0.26 lib/tasks/db.rake
renalware-core-2.0.25 lib/tasks/db.rake
renalware-core-2.0.24 lib/tasks/db.rake
renalware-core-2.0.23 lib/tasks/db.rake
renalware-core-2.0.22 lib/tasks/db.rake
renalware-core-2.0.21 lib/tasks/db.rake