Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
delete cache and fill transactions
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