Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SerializationError in Regenerate Derivatives task #5296

Merged
merged 1 commit into from Dec 15, 2021

Conversation

mark-dce
Copy link
Contributor

Fixes ActiveJob::SerializationError in hyrax:file_sets:regenerate_derivatives task.

CreateDerivativesJob expects a FileID of type String instead of a Hydra::PCDM::File object.
see https://github.com/samvera/hyrax/blob/main/app/jobs/create_derivatives_job.rb#L6

Running the task as-is gives me the following error:

 RAILS_ENV=production bundle exec rails hyrax:file_sets:regenerate_derivatives 
[DEPRECATION] PCDM is deprecating 'Class#PreservationMasterFile'. Use Class#PreservationFile instead.
rails aborted!
ActiveJob::SerializationError: Unsupported argument type: Hydra::PCDM::File

This was the simplest change I could make to get the task to run successfully.

Changes proposed in this pull request:

  • Send the CreateDerivatives job the expected argument type

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • The task had no test that I could see

@samvera/hyrax-code-reviewers

CreateDerivativesJob expects a FileID of type String instead of a Hydra::PCDM::File object.  
see https://github.com/samvera/hyrax/blob/main/app/jobs/create_derivatives_job.rb#L6

Running the task as-is gives me the following error:
```
 RAILS_ENV=production bundle exec rails hyrax:file_sets:regenerate_derivatives 
[DEPRECATION] PCDM is deprecating 'Class#PreservationMasterFile'. Use Class#PreservationFile instead.
rails aborted!
ActiveJob::SerializationError: Unsupported argument type: Hydra::PCDM::File
```

This was the simplest change I could make to get the task to run successfully.
@no-reply no-reply merged commit e3baf5e into main Dec 15, 2021
@no-reply no-reply deleted the mark-dce-patch-1 branch December 15, 2021 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants