From d061a314869575c15bb01487b23e8122c2f7e0b3 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 4 Nov 2013 10:35:28 -0200 Subject: [PATCH] Adding option to reindex with batch size using fab --- fabfile.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fabfile.py b/fabfile.py index 90afd0e..eb3aab4 100644 --- a/fabfile.py +++ b/fabfile.py @@ -89,13 +89,18 @@ def deploy(update=False): sudo('supervisorctl restart all') -def rebuild_index(age=None): +def rebuild_index(age=None, batch=None): with cd('~/colab/src/'), prefix(WORKON_COLAB): age_arg = '' if age: age_arg = '--age={}'.format(age) - run('python manage.py rebuild_index {}'.format(age_arg)) + batch_arg = '' + if batch: + batch_arg = '--batch-size={}'.format(batch) + + + run('python manage.py rebuild_index {} {}'.format(age_arg, batch_arg)) @with_settings(user='vagrant') -- libgit2 0.21.2