@@ -1136,6 +1136,7 @@ def update_app_instances(
1136
1136
commit = self .build ['commit' ],
1137
1137
build = self .build ['id' ],
1138
1138
search_ranking = self .config .search .ranking ,
1139
+ search_ignore = self .config .search .ignore ,
1139
1140
)
1140
1141
1141
1142
def setup_python_environment (self ):
@@ -1278,7 +1279,7 @@ def is_type_sphinx(self):
1278
1279
1279
1280
# Web tasks
1280
1281
@app .task (queue = 'reindex' )
1281
- def fileify (version_pk , commit , build , search_ranking ):
1282
+ def fileify (version_pk , commit , build , search_ranking , search_ignore ):
1282
1283
"""
1283
1284
Create ImportedFile objects for all of a version's files.
1284
1285
@@ -1317,6 +1318,7 @@ def fileify(version_pk, commit, build, search_ranking):
1317
1318
commit = commit ,
1318
1319
build = build ,
1319
1320
search_ranking = search_ranking ,
1321
+ search_ignore = search_ignore ,
1320
1322
)
1321
1323
except Exception :
1322
1324
changed_files = set ()
@@ -1494,7 +1496,7 @@ def clean_build(version_pk):
1494
1496
return True
1495
1497
1496
1498
1497
- def _create_imported_files (* , version , commit , build , search_ranking ):
1499
+ def _create_imported_files (* , version , commit , build , search_ranking , search_ignore ):
1498
1500
"""
1499
1501
Create imported files for version.
1500
1502
@@ -1564,6 +1566,12 @@ def _create_imported_files(*, version, commit, build, search_ranking):
1564
1566
page_rank = rank
1565
1567
break
1566
1568
1569
+ ignore = False
1570
+ for pattern in search_ignore :
1571
+ if fnmatch (relpath , pattern ):
1572
+ ignore = True
1573
+ break
1574
+
1567
1575
# Create imported files from new build
1568
1576
model_class .objects .create (
1569
1577
project = version .project ,
@@ -1574,6 +1582,7 @@ def _create_imported_files(*, version, commit, build, search_ranking):
1574
1582
rank = page_rank ,
1575
1583
commit = commit ,
1576
1584
build = build ,
1585
+ ignore = ignore ,
1577
1586
)
1578
1587
1579
1588
# This signal is used for clearing the CDN,
0 commit comments