コード例 #1
0
ファイル: Program.cs プロジェクト: asanyaga/BuildTest
        static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure();
            ILog log = log4net.LogManager.GetLogger("MAIN");
            var l = log.Logger;

            log.Info("Starting the migration application ==================================================");

            Stopwatch sw = new Stopwatch();
            sw.Start();
            try
            {
                var settings = new AppSettings();
                BlobCache.ApplicationName = settings.LocalCache;
                int noDocumentIdsSaved = new SaveMongoCommandsToLocalCache().Go().Result;
                int noDocumentsProcessed = new MigrateDocumentCommands().Go().Result;
            }
            catch (AggregateException ex)
            {
                log.Error("Unhandled aggregate error");
                log.Error(ex.Flatten().Message);
            }
            catch (Exception ex)
            {
                log.Error(ex);
            }
            sw.Stop();
            log.InfoFormat("Total time taken to complete {0} seconds", sw.Elapsed.TotalSeconds);
            log.Info("Press any key to continue");
            Console.ReadLine();

        }
コード例 #2
0
        public async Task<int> Go()
        {
            log.Info("Start map reduce to extract and save document ids to local cache==============================");
            var settings = new AppSettings();

            await BlobCache.UserAccount.InvalidateAll();

            int noDocuments = await MapReduceToDocumentid(settings.MongoCollection_Command_CommandProcessingAudit);
            //List<MapReduceResult> qry1 = await SimpleAkavacheQuery();
            return noDocuments;
        }
コード例 #3
0
 public MigrateDocumentCommands()
 {
     settings = new AppSettings();
 }