<commit_before>namespace :cloudmodel do
  namespace :monitoring do
    desc "Check monitoring"
    task :check => [:environment] do
      CloudModel::Host.scoped.each do |host|
        unless host.deploy_state == :rebooting
          CloudModel::Monitoring::HostChecks.new(host).check
          host.guests.each do |guest|
            unless guest.deploy_state == :rebooting
              CloudModel::Monitoring::GuestChecks.new(guest).check
              guest.lxd_custom_volumes.each do |lxd_custom_volume|
                CloudModel::Monitoring::LxdCustomVolumeChecks.new(lxd_custom_volume).check
              end
              guest.services.each do |service|
                CloudModel::Monitoring::ServiceChecks.new(service).check
              end
            end
          end
        end
      end
      puts "Done."
    end
  end
end<commit_msg>Do not monitor rebooting or not yet deployed hosts and guests<commit_after>namespace :cloudmodel do
  namespace :monitoring do
    desc "Check monitoring"
    task :check => [:environment] do
      CloudModel::Host.scoped.each do |host|
        unless [:booting, :not_started].include?(host.deploy_state)
          CloudModel::Monitoring::HostChecks.new(host).check
          host.guests.each do |guest|
            unless [:booting, :not_started].include?(guest.deploy_state)
              CloudModel::Monitoring::GuestChecks.new(guest).check
              guest.lxd_custom_volumes.each do |lxd_custom_volume|
                CloudModel::Monitoring::LxdCustomVolumeChecks.new(lxd_custom_volume).check
              end
              guest.services.each do |service|
                CloudModel::Monitoring::ServiceChecks.new(service).check
              end
            end
          end
        end
      end
      puts "Done."
    end
  end
end
{'fraction_non_alphanumeric': 0.08879023307436182, 'fraction_numerical': 0.0, 'mean_word_length': 2.236983842010772, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6804198', 'n_tokens_mistral': 510, 'n_tokens_neox': 504, 'n_words': 101}