Commit d061a314869575c15bb01487b23e8122c2f7e0b3

Authored by Sergio Oliveira
1 parent 348c1525

Adding option to reindex with batch size using fab

Showing 1 changed file with 7 additions and 2 deletions   Show diff stats
fabfile.py
... ... @@ -89,13 +89,18 @@ def deploy(update=False):
89 89 sudo('supervisorctl restart all')
90 90  
91 91  
92   -def rebuild_index(age=None):
  92 +def rebuild_index(age=None, batch=None):
93 93 with cd('~/colab/src/'), prefix(WORKON_COLAB):
94 94 age_arg = ''
95 95 if age:
96 96 age_arg = '--age={}'.format(age)
97 97  
98   - run('python manage.py rebuild_index {}'.format(age_arg))
  98 + batch_arg = ''
  99 + if batch:
  100 + batch_arg = '--batch-size={}'.format(batch)
  101 +
  102 +
  103 + run('python manage.py rebuild_index {} {}'.format(age_arg, batch_arg))
99 104  
100 105  
101 106 @with_settings(user='vagrant')
... ...