Created
May 8, 2018 13:05
-
-
Save Casual3498/36becf26d8ec6c3ae312fe6b8899360e to your computer and use it in GitHub Desktop.
delete cache and fill transactions
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
del_keys = $redis.keys.select { |el| /\ACryptocompareClient:(BTC|ETH):USD:(\d{10})\z/.match(el).present?&&/\ACryptocompareClient:(BTC|ETH):USD:(\d{10})\z/.match(el)[2].to_i >= DateTime.parse('18-04-2018 00:00').to_i } | |
del_keys.each { |key| $redis.del(key) } | |
EthTransaction.all.each { |tr| tr.set_usd_amount } | |
BtcTransaction.all.each { |tr| tr.set_usd_amount } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment