예제 #1
0
        private static void Run()
        {
            var mongo = new MongoRepository();
            var repository = new RepositoryRetriever();

            while (true)
            {
                var repositoryUrl = mongo.GetUrl();

                if (repositoryUrl == null)
                {
                    Thread.Sleep(1000);
                    continue;
                }

                WriteToConsole(string.Format("{0} found", repositoryUrl.Url));

                WriteToConsole("Cloning Repository");
                repository.AddRepository(repositoryUrl);

                WriteToConsole("Generating Versions");
                GenerateAllVersions(repositoryUrl);

                WriteToConsole("Calculating Metrics");
                CalculateMetrics(repositoryUrl);

                //WriteToConsole("Removing Url");
                //mongo.DeleteUrl(repositoryUrl);

                WriteToConsole("Complete");
            }
        }