0d5eb96adeb12ecc2c2a1fd4554cc6a01c5c5b98,apps/search/models.py,MUserSearch,index_subscriptions_for_search,#MUserSearch#,48

Before Change


        user = User.objects.get(pk=self.user_id)
        r = redis.Redis(connection_pool=settings.REDIS_PUBSUB_POOL)
        r.publish(user.username, "search_index_complete:start")
        throttle = time.time()
        
        subscriptions = UserSubscription.objects.filter(user=user)
        total = subscriptions.count()
        logging.user(user, "~FCIndexing ~SB%s feeds~SN for ~SB~FB%s~FC~SN..." % 

After Change


            except Feed.DoesNotExist:
                continue
        
        feed_id_chunks = [c for c in chunks(feed_ids, 6)]
        logging.user(user, "~FCIndexing ~SB%s feeds~SN in %s chunks..." % 
                     (total, len(feed_id_chunks)))
        
        tasks = [IndexSubscriptionsChunkForSearch().s(feed_ids=feed_id_chunk,
                                                      user_id=self.user_id
                                                      ).set(queue="search_indexer")
                 for feed_id_chunk in feed_id_chunks]
        group = celery.group(*tasks)
        res = group.apply_async(queue="search_indexer")
        res.join_native()
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: samuelclay/NewsBlur
Commit Name: 0d5eb96adeb12ecc2c2a1fd4554cc6a01c5c5b98
Time: 2014-04-22
Author: samuel@ofbrooklyn.com
File Name: apps/search/models.py
Class Name: MUserSearch
Method Name: index_subscriptions_for_search


Project Name: AxeldeRomblay/MLBox
Commit Name: 8768184ae39b420292acc25eda9ae43c3af0752d
Time: 2017-06-20
Author: axelderomblay@gmail.com
File Name: python-package/mlbox/model/supervised/regression/stacking_regressor.py
Class Name: StackingRegressor
Method Name: fit_transform


Project Name: pantsbuild/pants
Commit Name: 937907d721b8e4e9628b6d13bb59423e4406a5f1
Time: 2015-04-20
Author: itay@twitter.com
File Name: src/python/pants/backend/python/tasks/pytest_run.py
Class Name: PytestRun
Method Name: _do_run_tests