Last active
June 28, 2017 21:01
-
-
Save blackjid/8c37583e3588373e6f881b9f8e7a2a21 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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