43
43
OPENGROK_WEBAPPS_DIR = os .path .join (tomcat_root , "webapps" )
44
44
OPENGROK_JAR = os .path .join (OPENGROK_LIB_DIR , "opengrok.jar" )
45
45
46
- AOSPAPP_BASE_DIR = os .path .join (fs_root , "aospapp " )
46
+ AOSPAPP_BASE_DIR = os .path .join (fs_root , "scripts " )
47
47
ROOT_WAR = os .path .join (AOSPAPP_BASE_DIR , "ROOT.war" )
48
48
49
49
task_queue = queue .Queue ()
@@ -330,8 +330,10 @@ def check_index_and_wipe_out(logger, project, config_file):
330
330
shutil .rmtree (path )
331
331
except Exception as exc :
332
332
logger .error ("cannot delete '{}': {}" .format (path , exc ))
333
+ return True
333
334
else :
334
335
print ("[TEST] ignore wiping data" )
336
+ return False
335
337
336
338
337
339
def get_all_aosp_projects ():
@@ -348,7 +350,7 @@ def process_project(logger, log_level, project):
348
350
if not os .path .exists (config_file_path ) or os .path .getsize (config_file_path ) == 0 :
349
351
create_bare_config (logger , project , config_file_path )
350
352
351
- check_index_and_wipe_out (logger , project , config_file_path )
353
+ need_index = check_index_and_wipe_out (logger , project , config_file_path )
352
354
353
355
#
354
356
# If there is read-only configuration file, merge it with current
@@ -383,18 +385,19 @@ def process_project(logger, log_level, project):
383
385
if out_file_path :
384
386
os .remove (out_file_path )
385
387
386
- indexer_args = (
387
- logger ,
388
- project ,
389
- uri ,
390
- config_file_path ,
391
- )
392
-
393
- logger .debug ("Queue index thread" )
394
- index_thread = threading .Thread (
395
- target = project_indexer , name = "Indexer thread for " + project , args = indexer_args , daemon = True
396
- )
397
- task_queue .put (index_thread )
388
+ if need_index :
389
+ indexer_args = (
390
+ logger ,
391
+ project ,
392
+ uri ,
393
+ config_file_path ,
394
+ )
395
+
396
+ logger .info ("Queue index thread for " + project )
397
+ index_thread = threading .Thread (
398
+ target = project_indexer , name = "Indexer thread for " + project , args = indexer_args , daemon = True
399
+ )
400
+ task_queue .put (index_thread )
398
401
399
402
400
403
def indexer_worker ():
0 commit comments