示例#1
0
        // We need to scan the notes initially to fill up last_modified_table
        // Otherwise, we might miss deletions that occur before any addition
        private void ScanNotesInitial()
        {
            NotesIndexableGenerator generator = new NotesIndexableGenerator(this, knotes_file, last_modified_table, true);

            // just a dummy scan
            while (generator.HasNextIndexable())
            {
                generator.GetNextIndexable();
            }
        }
示例#2
0
        /////////////////////////////////////////////////

        private void Index()
        {
            if (ThisScheduler.ContainsByTag("KNotes"))
            {
                Logger.Log.Debug("Not adding task for already running KNotes task");
                return;
            }

            // Then add the notes from the notes file
            NotesIndexableGenerator generator = new NotesIndexableGenerator(this, knotes_file, last_modified_table, false);

            Scheduler.Task task;
            task     = NewAddTask(generator);
            task.Tag = "KNotes";
            // Make sure add task gets scheduled after delete task
            task.Priority    = Scheduler.Priority.Delayed;
            task.SubPriority = 0;
            ThisScheduler.Add(task);
        }
示例#3
0
		/////////////////////////////////////////////////

		private void Index ()
		{
			if (ThisScheduler.ContainsByTag ("KNotes")) {
				Logger.Log.Debug ("Not adding task for already running KNotes task");
				return;
			}

			// Then add the notes from the notes file
			NotesIndexableGenerator generator = new NotesIndexableGenerator (this, knotes_file, last_modified_table, false);
			Scheduler.Task task;
			task = NewAddTask (generator);
			task.Tag = "KNotes";
			// Make sure add task gets scheduled after delete task
			task.Priority = Scheduler.Priority.Delayed;
			task.SubPriority = 0;
			ThisScheduler.Add (task);
		}
示例#4
0
		// We need to scan the notes initially to fill up last_modified_table
		// Otherwise, we might miss deletions that occur before any addition
		private void ScanNotesInitial ()
		{
			NotesIndexableGenerator generator = new NotesIndexableGenerator (this, knotes_file, last_modified_table, true);

			// just a dummy scan
			while (generator.HasNextIndexable ())
				generator.GetNextIndexable ();
		}