Skip to content

Commit

Permalink
Merge pull request #1107 from projecthydra/now
Browse files Browse the repository at this point in the history
Changing derivatives job to perform_now
  • Loading branch information
atz committed Nov 23, 2016
2 parents 90eb6a7 + d14d4d7 commit b073550
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/jobs/characterize_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ def perform(file_set, file_id, filepath = nil)
file_set.characterization_proxy.save!
file_set.update_index
file_set.parent.in_collections.each(&:update_index) if file_set.parent
CreateDerivativesJob.perform_later(file_set, file_id, filename)
CreateDerivativesJob.perform_now(file_set, file_id, filename)
end
end
4 changes: 2 additions & 2 deletions spec/jobs/characterize_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
expect(Hydra::Works::CharacterizationService).to receive(:run).with(file, filename)
expect(file).to receive(:save!)
expect(file_set).to receive(:update_index)
expect(CreateDerivativesJob).to receive(:perform_later).with(file_set, file.id, filename)
expect(CreateDerivativesJob).to receive(:perform_now).with(file_set, file.id, filename)
described_class.perform_now(file_set, file.id)
end
end
Expand All @@ -46,7 +46,7 @@
allow(Hydra::Works::CharacterizationService).to receive(:run).with(file, filename)
allow(file).to receive(:save!)
allow(file_set).to receive(:update_index)
allow(CreateDerivativesJob).to receive(:perform_later).with(file_set, file.id, filename)
allow(CreateDerivativesJob).to receive(:perform_now).with(file_set, file.id, filename)
end
it "reindexes the collection" do
expect(collection).to receive(:update_index)
Expand Down

0 comments on commit b073550

Please sign in to comment.