From a4646adff827fd45d7a468bfc36e10e99af92ad5 Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Thu, 31 Mar 2011 22:18:18 +0000
Subject: [PATCH] Wait for all index/reindex before next build.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44951 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Configurator/Document/BusinessConfiguration.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Configurator/Document/BusinessConfiguration.py b/product/ERP5Configurator/Document/BusinessConfiguration.py
index 05ae8193a9..dfee8f74af 100644
--- a/product/ERP5Configurator/Document/BusinessConfiguration.py
+++ b/product/ERP5Configurator/Document/BusinessConfiguration.py
@@ -383,7 +383,8 @@ class BusinessConfiguration(Item):
       actions and Configurator requets
     """
     kw = dict(tag="start", 
-              after_method_id="recursiveImmediateReindexObject")
+              after_method_id=["recursiveImmediateReindexObject",
+                               'immediateReindexObject'])
     start = time.time()
     LOG("CONFIGURATOR", INFO, 
         'Build process started for %s' % self.getRelativeUrl())
@@ -403,7 +404,9 @@ class BusinessConfiguration(Item):
                                                              time.time() - start))
 
     if execute_after_setup_script:
-      kw["after_method_id"] = ["buildItem", 'recursiveImmediateReindexObject']
+      kw["after_method_id"] = ["buildItem", 'immediateReindexObject', \
+                               "recursiveImmediateReindexObject"]
+
       self.activate(**kw).ERP5Site_afterConfigurationSetup()
       LOG("Business Configuration", INFO,
           "After setup script called (force) for %s : %s" %
-- 
2.30.9