Fixing two bugs: dont clear mapping/index when re-indexing at offset. Pull on pip upgrades.

This commit is contained in:
Samuel Clay 2014-04-11 18:09:23 -07:00
parent 75b0926f56
commit ddb08ccd0b
2 changed files with 3 additions and 1 deletions

View file

@ -236,7 +236,8 @@ class Feed(models.Model):
@classmethod
def index_all_for_search(cls, offset=0):
SearchFeed.create_elasticsearch_mapping()
if not offset:
SearchFeed.create_elasticsearch_mapping()
last_pk = cls.objects.latest('pk').pk
for f in xrange(offset, last_pk, 1000):

1
fabfile.py vendored
View file

@ -432,6 +432,7 @@ def setup_python():
sudo('chown -R ubuntu.ubuntu /home/ubuntu/.python-eggs')
def pip():
pull()
with cd(env.NEWSBLUR_PATH):
sudo('easy_install -U pip')
sudo('pip install --upgrade pip')