Closed jeremyf closed 2 years ago
The following line is creating a problem when attempting to move an upstream setting of Hydra::Derivatives.source_file_service to an initializer:
Hydra::Derivatives.source_file_service
https://github.com/projecthydra/hydra-works/blob/d0e87d017c20ffbecbaeda8c09b376747b9cdebc/lib/hydra/works/models/concerns/file_set/derivatives.rb
Ideally, the override would occur as part of a configuration. I attempted this in Hyrax, and encountered the following error in Hyrax tests:
Failures: 1) IngestFileJob with two existing versions from different users has two versions Failure/Error: yield ::File.open(file_name) KeyError: key not found: :object # ./app/services/hyrax/local_file_service.rb:7:in `call' # ./app/services/hyrax/file_set_derivatives_service.rb:60:in `create_image_derivatives' # ./app/services/hyrax/file_set_derivatives_service.rb:24:in `create_derivatives' # ./app/models/concerns/hyrax/file_set/derivatives.rb:11:in `create_derivatives' # ./app/jobs/create_derivatives_job.rb:11:in `perform' # ./app/jobs/characterize_job.rb:15:in `perform' # ./app/jobs/ingest_file_job.rb:35:in `perform' # ./spec/jobs/ingest_file_job_spec.rb:61:in `block (3 levels) in <top (required)>' 2) CreateDerivativesJob with a pdf file searches the extracted content Failure/Error: yield ::File.open(file_name) KeyError: key not found: :object # ./app/services/hyrax/local_file_service.rb:7:in `call' # ./app/services/hyrax/file_set_derivatives_service.rb:31:in `create_pdf_derivatives' # ./app/services/hyrax/file_set_derivatives_service.rb:20:in `create_derivatives' # ./app/models/concerns/hyrax/file_set/derivatives.rb:11:in `create_derivatives' # ./app/jobs/create_derivatives_job.rb:11:in `perform' # ./spec/jobs/create_derivatives_job_spec.rb:88:in `block (3 levels) in <top (required)>' # ./spec/jobs/create_derivatives_job_spec.rb:7:in `block (2 levels) in <top (required)>'
What ended up happening is during the load sequence, the initializer first fired for Hyrax, then the include Hydra::Works::Derivatives fired.
The following line is creating a problem when attempting to move an upstream setting of
Hydra::Derivatives.source_file_service
to an initializer:https://github.com/projecthydra/hydra-works/blob/d0e87d017c20ffbecbaeda8c09b376747b9cdebc/lib/hydra/works/models/concerns/file_set/derivatives.rb
Ideally, the override would occur as part of a configuration. I attempted this in Hyrax, and encountered the following error in Hyrax tests:
What ended up happening is during the load sequence, the initializer first fired for Hyrax, then the include Hydra::Works::Derivatives fired.