Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@blackjid
Last active June 28, 2017 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackjid/8c37583e3588373e6f881b9f8e7a2a21 to your computer and use it in GitHub Desktop.
Save blackjid/8c37583e3588373e6f881b9f8e7a2a21 to your computer and use it in GitHub Desktop.
ENV['RAILS_ENV'] = ARGV[0] || 'production'
DIR = File.dirname(__FILE__)
require DIR + '/config/environment'
class PriceLoader
include PricingLogger
def load
log_start_proccess
PriceChange.where(realm: nil).order("price_changed_at").find_each do |price_change|
log_msg(CreateRealmPriceChanges.for(price_change).to_s)
end
ensure
log_end_process
end
end
PriceLoader.new.load
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment