Beispiel #1
0
        public static void Startup(System.IO.TextWriter consoleOut)
        {
            // initialize from index
            var cud = IndexManager.IndexingEngine.ReadActivityStatusFromIndexAsync(CancellationToken.None).GetAwaiter().GetResult();

            var gapsLength = cud.Gaps?.Length ?? 0;

            var lastDatabaseId = IndexManager.GetLastStoredIndexingActivityId();

            using (var op = SnTrace.Index.StartOperation("IAQ: InitializeFromIndex. LastIndexedActivityId: {0}, LastDatabaseId: {1}, TotalUnprocessed: {2}"
                                                         , cud.LastActivityId, lastDatabaseId, lastDatabaseId - cud.LastActivityId + gapsLength))
            {
                Startup(lastDatabaseId, cud.LastActivityId, cud.Gaps, consoleOut);

                op.Successful = true;
            }

            IndexHealthMonitor.Start(consoleOut);
        }
Beispiel #2
0
 public static void ShutDown()
 {
     SnTrace.IndexQueue.Write("Shutting down IndexingActivityQueue.");
     Serializer.ShutDown();
     IndexHealthMonitor.ShutDown();
 }