public static ExecuteActivity ( |
||
activity | ||
waitForComplete | bool | |
distribute | bool | |
리턴 | void |
private void RefreshIndexOneNode(Node node) { // node index is refreshed only on this node and should not be distributed. var versionId = node.VersionId; if (RepositoryInstance.ContentQueryIsAllowed) { var activity = CreateActivity(IndexingActivityType.UpdateDocument, node.Id, node.VersionId, node.VersionTimestamp, null, null); IndexingActivityManager.ExecuteActivity(activity, true, false); } }
private static void ProcessTasks(IndexingActivity[] activities, System.IO.TextWriter consoleOut) { if (consoleOut != null && activities.Length != 0) { consoleOut.Write(" Executing {0} unprocessed tasks ...", activities.Length); } foreach (var activity in activities) { activity.FromHealthMonitor = true; // make sure adddocument will delete first IndexingActivityManager.ExecuteActivity(activity, false, false); } }
internal static void ExecuteLostIndexingActivities() { lock (_executingUnprocessedIndexingActivitiesLock) { var gap = MissingActivityHandler.GetOldestGapAndMoveToNext(); var i = 0; while (i * ACTIVITIESFRAGMENTSIZE < gap.Length) { var gapSegment = gap.Skip(i * ACTIVITIESFRAGMENTSIZE).Take(ACTIVITIESFRAGMENTSIZE).ToArray(); var activities = IndexingActivityManager.GetUnprocessedActivities(gapSegment); if (activities.Length > 0) { foreach (var act in activities) { act.FromHealthMonitor = true; IndexingActivityManager.ExecuteActivity(act, false, false); } } i++; } } }
private static void ExecuteActivity(IndexingActivity activity) { IndexingActivityManager.RegisterActivity(activity); IndexingActivityManager.ExecuteActivity(activity, true, true); }