Sha256: 557eba13f24d3ff600bb651303a5475a7a39c059c47dbea3aa89d32f51b729e9

Contents?: true

Size: 573 Bytes

Versions: 1

Compression:

Stored size: 573 Bytes

Contents

namespace :g5_updatable do

  desc 'loads all of g5-hub into local DB. Note: the ENV variables for G5-Auth need to be set!'

  task load_all: :environment do
    puts "loading urns from #{G5Updatable::AllClientUrnsFetcher::url}...."

    G5Updatable::ClientFeedProcessor.load_all_clients

    puts 'Success!!'
  end

  desc 'convert locations belongs_to :client to client_urn FK'
  task location_client_urn_conversion: :environment do
    G5Updatable::Location.find_each do |location|
      location.save #location has a before_validation #set_client_urn
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
g5_updatable-0.20.3.pre.1 lib/tasks/g5_updatable_tasks.rake