Sha256: 757013d0452a78418436529d7487a595c34eaad34b1c9a665f8e8dfa1d3c9545

Contents?: true

Size: 900 Bytes

Versions: 2

Compression:

Stored size: 900 Bytes

Contents

# Indexing tasks.
#
namespace :index do

  desc "Takes a snapshot, indexes, and caches in random order."
  task :randomly => :application do
    Indexes.index true
  end
  desc "Takes a snapshot, indexes, and caches in order given."
  task :ordered => :application do
    Indexes.index false
  end

  # desc "Generates the index snapshots."
  #
  # Note: Hidden since it is only needed by pro users.
  #
  # desc "Generate the data snapshots (intermediate table on a DB source)"
  task :generate_snapshots => :application do
    Indexes.take_snapshot
  end

  desc "Generates a specific index from index snapshots (category optional)."
  task :specific, [:index, :category] => :application do |_, options|
    index, category = options.index, options.category
    specific_index = Indexes.find index.to_sym, (category && category.to_sym)
    specific_index.index!
    specific_index.cache!
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picky-2.5.2 lib/tasks/index.rake
picky-2.5.1 lib/tasks/index.rake