Commits

Benoit C  committed f6d0b75

haystack core management functions

  • Participants
  • Parent commits 52be1c4

Comments (0)

Files changed (2)

File src/fabfile.py

 from fabric.api import *
 from fabric.contrib.files import exists, sed
 from fabulator.decorators import Permissions, ConfChecker
-from fabulator.core import mysql, south
+from fabulator.core import mysql, south, haystack
 
 
 import yaml

File src/fabulator/core/haystack.py

+"""
+    fonctions to manage hastack
+"""
+
+from fabric.api import run, cd
+
+def recreate_index(conf):
+    with cd(conf.get('src_dir')):
+        run("yes | ./manage.py rebuild_index")
+    
+
+def remove_indexes(conf):
+    run("rm -Rf %(indexes)s" % conf)