diff --git a/readthedocs/projects/tasks.py b/readthedocs/projects/tasks.py index 48d9e94d8ab..06ccde4300f 100644 --- a/readthedocs/projects/tasks.py +++ b/readthedocs/projects/tasks.py @@ -787,14 +787,13 @@ def run_build(self, record): # We upload EXTERNAL version media files to blob storage # We should have this check here to make sure # the files don't get re-uploaded on web. - if self.version.type != EXTERNAL: - self.update_app_instances( - html=bool(outcomes['html']), - search=bool(outcomes['search']), - localmedia=bool(outcomes['localmedia']), - pdf=bool(outcomes['pdf']), - epub=bool(outcomes['epub']), - ) + self.update_app_instances( + html=bool(outcomes['html']), + search=bool(outcomes['search']), + localmedia=bool(outcomes['localmedia']), + pdf=bool(outcomes['pdf']), + epub=bool(outcomes['epub']), + ) else: log.warning('No build ID, not syncing files') @@ -1114,9 +1113,6 @@ def update_app_instances( 'Updating version failed, skipping file sync: version=%s', self.version, ) - hostname = socket.gethostname() - - delete_unsynced_media = True # Broadcast finalization steps to web application instances fileify.delay( @@ -1272,7 +1268,7 @@ def fileify(version_pk, commit, build): This is so we have an idea of what files we have in the database. """ version = Version.objects.get_object_or_log(pk=version_pk) - if not version: + if not version or version.type == EXTERNAL: return project = version.project