public ThunderbirdIndexableGenerator(ThunderbirdIndexer indexer, TB.Account account, string db_file) { this.indexer = indexer; this.indexer.NotificationEvent += OnNotification; this.account = account; this.full_index = true; this.db_file = db_file; this.done = false; this.relative_path = Thunderbird.GetRelativePath(db_file); // Load the database and make sure the enumerator is up to date. Otherwise we will // get lots of null exceptions when enumerating the database. LoadDatabase(); ResetEnumerator(); // Fetch all already stored uris in the index. This way we can remove one uri at the time // while we are indexing and thus in the end now which mails that doesn't exist anymore. if (relative_path != null) { stored_cache = indexer.Lucene.GetStoredUriStrings(account.Server, relative_path); } else { Logger.Log.Debug("Relative path could not be determined for: {0}. Indexing speed will suffer.", db_file); } }
private void StartWorker() { if (indexer != null) { return; // already started } Logger.Log.Debug("Starting Thunderbird backend"); Stopwatch watch = new Stopwatch(); watch.Start(); string toindex_dir = ToIndexDirectory; if (!Directory.Exists(toindex_dir)) { Logger.Log.Debug("No Thunderbird data to index in {0}", toindex_dir); return; } indexer = new ThunderbirdIndexer(this); indexer.Start(); watch.Stop(); Logger.Log.Debug("Thunderbird backend done in {0}s", watch.ElapsedTime); }
public ThunderbirdIndexableGenerator(ThunderbirdIndexer indexer, string path) { Logger.Log.Debug("New Thunderbird indexable generator launched for {0}", path); this.indexer = indexer; this.path = path; this.processed_files = new Queue(); ReadToIndexDirectory(); }
public ThunderbirdQueryable () : base ("ThunderbirdIndex") { // Remove one second from the start time to make sure we don't run into any troubles indexing_start = DateTime.UtcNow.Subtract (new TimeSpan (0, 0, 1)); indexer = null; GMime.Global.Init (); if (Environment.GetEnvironmentVariable ("BEAGLE_THUNDERBIRD_DEBUG") != null) { Thunderbird.Debug = true; Logger.Log.Debug ("Running Thunderbird backend in debug mode"); } }
public ThunderbirdQueryable() : base("ThunderbirdIndex") { // Remove one second from the start time to make sure we don't run into any troubles indexing_start = DateTime.UtcNow.Subtract(new TimeSpan(0, 0, 1)); indexer = null; GMime.Global.Init(); if (Environment.GetEnvironmentVariable("BEAGLE_THUNDERBIRD_DEBUG") != null) { Thunderbird.Debug = true; Logger.Log.Debug("Running Thunderbird backend in debug mode"); } }
private void StartWorker () { Logger.Log.Info ("Starting Thunderbird backend"); Stopwatch watch = new Stopwatch (); watch.Start (); string root_path = Thunderbird.GetRootPath (); if (!Directory.Exists (root_path)) { GLib.Timeout.Add (60000, new GLib.TimeoutHandler (IndexDataCheck)); Logger.Log.Info ("No data available for indexing in {0}", root_path); return; } indexer = new ThunderbirdIndexer (this, Thunderbird.GetProfilePaths (root_path)); indexer.Crawl (); watch.Stop (); Logger.Log.Info ("Thunderbird backend done in {0}s", watch.ElapsedTime); }
private void StartWorker() { Logger.Log.Info("Starting Thunderbird backend"); Stopwatch watch = new Stopwatch(); watch.Start(); string root_path = Thunderbird.GetRootPath(); if (!Directory.Exists(root_path)) { GLib.Timeout.Add(60000, new GLib.TimeoutHandler(IndexDataCheck)); Logger.Log.Info("No data available for indexing in {0}", root_path); return; } indexer = new ThunderbirdIndexer(this, Thunderbird.GetProfilePaths(root_path)); indexer.Crawl(); watch.Stop(); Logger.Log.Info("Thunderbird backend done in {0}s", watch.ElapsedTime); }
public ThunderbirdIndexableGenerator (ThunderbirdIndexer indexer, TB.Account account, string db_file) { this.indexer = indexer; this.indexer.NotificationEvent += OnNotification; this.account = account; this.full_index = true; this.db_file = db_file; this.done = false; this.relative_path = Thunderbird.GetRelativePath (db_file); // Load the database and make sure the enumerator is up to date. Otherwise we will // get lots of null exceptions when enumerating the database. LoadDatabase (); ResetEnumerator (); // Fetch all already stored uris in the index. This way we can remove one uri at the time // while we are indexing and thus in the end now which mails that doesn't exist anymore. if (relative_path != null) stored_cache = indexer.Lucene.GetStoredUriStrings (account.Server, relative_path); else Logger.Log.Debug ("Relative path could not be determined for: {0}. Indexing speed will suffer.", db_file); }
public NntpIndexableGenerator (ThunderbirdIndexer indexer, TB.Account account, string file) : base (indexer, account, file) { }
public ContactIndexableGenerator(ThunderbirdIndexer indexer, TB.Account account, string abook_file) : base(indexer, account, abook_file) { }
public RssIndexableGenerator (ThunderbirdIndexer indexer, TB.Account account, string mork_file) : base (indexer, account, mork_file) { }
public MailIndexableGenerator(ThunderbirdIndexer indexer, TB.Account account, string mork_file) : base(indexer, account, mork_file) { }
public ContactIndexableGenerator (ThunderbirdIndexer indexer, TB.Account account, string abook_file) : base (indexer, account, abook_file) { }
private void StartWorker () { if (indexer != null) return; // already started Logger.Log.Debug ("Starting Thunderbird backend"); Stopwatch watch = new Stopwatch (); watch.Start (); string toindex_dir = ToIndexDirectory; if (!Directory.Exists (toindex_dir)) { Logger.Log.Debug ("No Thunderbird data to index in {0}", toindex_dir); return; } indexer = new ThunderbirdIndexer (this); indexer.Start (); watch.Stop (); Logger.Log.Debug ("Thunderbird backend done in {0}s", watch.ElapsedTime); }
public ThunderbirdIndexableGenerator (ThunderbirdIndexer indexer, string path) { Logger.Log.Debug ("New Thunderbird indexable generator launched for {0}", path); this.indexer = indexer; this.path = path; this.processed_files = new Queue (); ReadToIndexDirectory (); }
public NntpIndexableGenerator(ThunderbirdIndexer indexer, TB.Account account, string file) : base(indexer, account, file) { }