<commit_before>﻿using DataAccess.Read;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace Jobs
{
    public class CleanJob
    {
        public static void Execute() {

            List<string> agents;

            using (var db = new ReadContext())
            {
                agents = db.DeployUnits.Select(x => x.Machine).Distinct().ToList();
            }

            foreach (var agent in agents)
            {

                using (var client = new HttpClient())
                {
                    client.BaseAddress = new Uri(agent);
                    var result2 = client.GetAsync("/api/deploy/clean").Result;
                }
            }
        }
    }
}<commit_msg>Added ingornig errors in clean job<commit_after>﻿using DataAccess.Read;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace Jobs
{
    public class CleanJob
    {
        public static void Execute()
        {

            List<string> agents;

            using (var db = new ReadContext())
            {
                agents = db.DeployUnits.Select(x => x.Machine).Distinct().ToList();
            }

            foreach (var agent in agents)
            {

                using (var client = new HttpClient())
                {
                    try
                    {
                        client.BaseAddress = new Uri(agent);
                        var result2 = client.GetAsync("/api/deploy/clean").Result;
                    }
                    catch (Exception e) { 
                        // do nothing, an agent may be unavailable at this time 
                        // or the network down. Just pass to the next
                    }
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09066947812335266, 'fraction_numerical': 0.0010542962572482868, 'mean_word_length': 1.3146341463414635, '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': '4086179', 'n_tokens_mistral': 491, 'n_tokens_neox': 459, 'n_words': 126}