Fixes error when transcript file is missing (cont) #2412
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Loads the Rails environment in download_clean_ingest.rb instead of stubbing the Rails module.
The use of ExternalFile within the ingest context was brittle because for some
reason thed download_clean_ingest.rb is explicitly avoiding loading the Rails
environment, and instead methods on the Rails module, such as .cache, and
simply calling Rails.cache.delete in the ExternalFile class caused the ingest
script to fail.
Not sure why the Rails environment was deliberately avoided during the ingest script, other
than a way to save on memory. But it's weird, and leads to brittle code, as this case
highlights.