<commit_before>module AssemblyCoin
  class SendBtc < AssemblyCoin::Worker

    def perform(product_id)

      product = Products.find(product_id)
      destination = product.wallet_public_address

      current_btc=GetBtcBalance.new.get_btc_balance(destination)
      current_time =  Time.now.getutc

      time_since_last_checked = current_time - product.last_checked_btc

      if ENV['MIN_PRODUCT_BTC'] > current_btc and time_since_last_checked > 3600 then
        amount = ENV['MIN_PRODUCT_BTC'] - current_btc

        product.update(last_checked_btc: current_time)

        Transactions.new.send_btc(public_address, destination, private_key, amount)
      end
    end
  end
end
<commit_msg>changed products typo to product<commit_after>module AssemblyCoin
  class SendBtc < AssemblyCoin::Worker

    def perform(product_id)

      product = Product.find(product_id)
      destination = product.wallet_public_address

      current_btc=GetBtcBalance.new.get_btc_balance(destination)
      current_time =  Time.now.getutc

      time_since_last_checked = current_time - product.last_checked_btc

      if ENV['MIN_PRODUCT_BTC'] > current_btc and time_since_last_checked > 3600 then
        amount = ENV['MIN_PRODUCT_BTC'] - current_btc

        product.update(last_checked_btc: current_time)

        Transactions.new.send_btc(public_address, destination, private_key, amount)
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.06818181818181818, 'fraction_numerical': 0.005681818181818182, 'mean_word_length': 3.776271186440678, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6328495', 'n_tokens_mistral': 464, 'n_tokens_neox': 447, 'n_words': 78}