<commit_before>namespace :amr do
  desc "Import data from N3RGY/DCC"
  task :import_n3rgy_readings, [:start_date, :end_date] => :environment do |_t, args|
    #Only expecting there to be one system-wide config
    #its just there to refer to import logs/messages
    config = AmrDataFeedConfig.n3rgy_api.first

    start_date = Date.parse(args[:start_date]) if args[:start_date].present?
    end_date = Date.parse(args[:end_date]) if args[:end_date].present?

    Meter.where(dcc_meter: true, consent_granted: true).each do |meter|
      puts "#{DateTime.now.utc} #{config.description} start"
      Amr::N3rgyDownloadAndUpsert.new(meter: meter, config: config, start_date: start_date, end_date: end_date).perform
      puts "#{DateTime.now.utc} #{config.description} end"
    end

  end
end
<commit_msg>correct log messages<commit_after>namespace :amr do
  desc "Import data from N3RGY/DCC"
  task :import_n3rgy_readings, [:start_date, :end_date] => :environment do |_t, args|
    #Only expecting there to be one system-wide config
    #its just there to refer to import logs/messages
    config = AmrDataFeedConfig.n3rgy_api.first

    start_date = Date.parse(args[:start_date]) if args[:start_date].present?
    end_date = Date.parse(args[:end_date]) if args[:end_date].present?

    puts "#{DateTime.now.utc} #{config.description} start"
    Meter.where(dcc_meter: true, consent_granted: true).each do |meter|
      Amr::N3rgyDownloadAndUpsert.new(meter: meter, config: config, start_date: start_date, end_date: end_date).perform
    end
    puts "#{DateTime.now.utc} #{config.description} end"
  end
end

{'fraction_non_alphanumeric': 0.1181592039800995, 'fraction_numerical': 0.004975124378109453, 'mean_word_length': 4.586805555555555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4326132', 'n_tokens_mistral': 554, 'n_tokens_neox': 550, 'n_words': 136}