Skip to content

Commit

Permalink
Merge pull request #1105 from samvera-labs/docs
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
atz authored Jun 1, 2017
2 parents 476385e + 958c205 commit 4e8b1b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/jobs/characterize_job.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class CharacterizeJob < Hyrax::ApplicationJob
queue_as Hyrax.config.ingest_queue_name

# Characterizes the file at 'filepath' if available, otherwise, pulls a copy from the repository
# and runs characterization on that file.
# @param [FileSet] file_set
# @param [String] file_id identifier for a Hydra::PCDM::File
# @param [String, NilClass] filepath the cached file within the Hyrax.config.working_path
Expand Down
3 changes: 1 addition & 2 deletions app/jobs/ingest_file_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def perform(file_set, filepath, user, opts = {})
# Do post file ingest actions
Hyrax::VersioningService.create(repository_file, user)

# TODO: this is a problem, the file may not be available at this path on another machine.
# It may be local, or it may be in s3
# In another worker, characterize the uploaded file.
CharacterizeJob.perform_later(file_set, repository_file.id, filepath)
end
end
2 changes: 2 additions & 0 deletions app/services/hyrax/working_directory.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module Hyrax
class WorkingDirectory
class << self
# Returns the file passed as filepath if that file exists. Otherwise it grabs the file from repository,
# puts it on the disk and returns that path.
# @param [String] repository_file_id identifier for Hydra::PCDM::File
# @param [String] id the identifier of the FileSet
# @param [String, NilClass] filepath path to existing cached copy of the file
Expand Down

0 comments on commit 4e8b1b0

Please sign in to comment.