Exemplo n.º 1
0
    def schedule_index_feeds_for_search(cls, feed_ids, user_id):
        user_search = cls.get_user(user_id, create=False)
        if (not user_search or not user_search.subscriptions_indexed
                or user_search.subscriptions_indexing):
            # User hasn't searched before.
            return

        if not isinstance(feed_ids, list):
            feed_ids = [feed_ids]
        IndexFeedsForSearch.apply_async(kwargs=dict(feed_ids=feed_ids,
                                                    user_id=user_id),
                                        queue='search_indexer')
Exemplo n.º 2
0
 def schedule_index_feeds_for_search(cls, feed_ids, user_id):
     user_search = cls.get_user(user_id, create=False)
     if (not user_search or 
         not user_search.subscriptions_indexed or 
         user_search.subscriptions_indexing):
         # User hasn't searched before.
         return
     
     if not isinstance(feed_ids, list):
         feed_ids = [feed_ids]
     IndexFeedsForSearch.apply_async(kwargs=dict(feed_ids=feed_ids, user_id=user_id), 
                                     queue='search_indexer')