Skip to content

Commit

Permalink
remove url_job_override, update RObs code to fit the Hyrax version we…
Browse files Browse the repository at this point in the history
… are using
  • Loading branch information
cziaarm committed Oct 8, 2024
1 parent 8545a5d commit eb94391
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
9 changes: 4 additions & 5 deletions app/actors/hyrax/actors/file_actor_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ module Actors
# Actions for a file identified by file_set and relation (maps to use predicate)
# @note Spawns asynchronous jobs
module FileActorDecorator
def perform_ingest_file_through_active_fedora(io)
# Skip versioning because versions will be minted by VersionCommitter as necessary during save_characterize_and_record_committer.
# these are files too big to send to S3 w/o Streaming
def ingest_file(io)
Rails.logger.error("[FileActor] starting write for #{file_set.id}")
if io.size.to_i >= 1.gigabytes
Rails.logger.error("[FileActor] Uploading directly to S3 for file_set #{file_set.id}")
Expand All @@ -25,8 +23,9 @@ def perform_ingest_file_through_active_fedora(io)
end
return false unless file_set.save
repository_file = related_file
create_version(repository_file, user)
CharacterizeJob.perform_later(file_set, repository_file.id, pathhint(io))
Hyrax::VersioningService.create(repository_file, user)
pathhint = io.uploaded_file.uploader.path if io.uploaded_file # in case next worker is on same filesystem
CharacterizeJob.perform_later(file_set, repository_file.id, pathhint || io.path)
end
end
end
Expand Down
29 changes: 0 additions & 29 deletions config/initializers/import_url_job_overrides.rb

This file was deleted.

0 comments on commit eb94391

Please sign in to comment.