From 7044f4676a083fc85c1092cf31eeda3dd279915d Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 24 Jul 2013 14:24:54 +0200 Subject: added add_to_index function, to add an article to the Whoosh index. --- source/feedgetter.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/feedgetter.py') diff --git a/source/feedgetter.py b/source/feedgetter.py index 31a02d4b..bd9cacc9 100755 --- a/source/feedgetter.py +++ b/source/feedgetter.py @@ -34,6 +34,7 @@ from datetime import datetime from contextlib import contextmanager import conf +import search import utils import mongodb @@ -177,6 +178,9 @@ class FeedGetter(object): articles.append(article) + # add the article to the Whoosh index + #search.add_to_index([article], feed) + if conf.MAIL_ENABLED and feed["mail"] and self.articles.get_articles(feed_id, article_id) == False: # if subscribed to the feed AND if article not already in the database threading.Thread(None, utils.send_mail, None, (conf.mail_from, conf.mail_to, \ -- cgit