@@ -786,20 +786,17 @@ def fileify(version_pk, commit):
786
786
"""
787
787
Create ImportedFile objects for all of a version's files.
788
788
789
- This is a prereq for indexing the docs for search.
790
- It also causes celery-haystack to kick off an index of the file.
789
+ This is so we have an idea of what files we have in the database.
791
790
"""
792
791
version = Version .objects .get (pk = version_pk )
793
792
project = version .project
794
793
795
- if not project .cdn_enabled :
796
- return
797
-
798
794
if not commit :
799
795
log .info (LOG_TEMPLATE
800
796
.format (project = project .slug , version = version .slug ,
801
797
msg = ('Imported File not being built because no commit '
802
798
'information' )))
799
+ return
803
800
804
801
path = project .rtd_build_path (version .slug )
805
802
if path :
@@ -848,12 +845,12 @@ def _manage_imported_files(version, path, commit):
848
845
version = version
849
846
).exclude (commit = commit ).delete ()
850
847
# Purge Cache
851
- changed_files = [resolve_path (
852
- version .project , filename = fname , version_slug = version .slug ,
853
- ) for fname in changed_files ]
854
848
cdn_ids = getattr (settings , 'CDN_IDS' , None )
855
849
if cdn_ids :
856
850
if version .project .slug in cdn_ids :
851
+ changed_files = [resolve_path (
852
+ version .project , filename = fname , version_slug = version .slug ,
853
+ ) for fname in changed_files ]
857
854
purge (cdn_ids [version .project .slug ], changed_files )
858
855
859
856
0 commit comments