Skip to content

Commit

Permalink
query job using job_id (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkghub authored Jul 9, 2024
1 parent 1ee7167 commit 5f466e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/operations/fdsh/pvc/dmf/request/batch_process.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Fdsh::Pvc::Dmf::Request::BatchProcess.new.call({job_id: @job.id, transactions_per_file: 5000 })
# Fdsh::Pvc::Dmf::Request::BatchProcess.new.call({job_id: job_id, transactions_per_file: 5000 })
module Fdsh
module Pvc
module Dmf
Expand Down Expand Up @@ -50,7 +50,7 @@ def validate(params)
# @param job_id [Integer] the ID of the job
# @return [Dry::Monads::Result] the result of the find operation
def find_job(job_id)
job = Transmittable::Job.find(job_id)
job = Transmittable::Job.where(job_id: job_id).last
Failure("Job not found for job_id: #{job_id}") unless job

Success(job)
Expand Down
2 changes: 1 addition & 1 deletion spec/operations/fdsh/pvc/dmf/request/batch_process_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
before do
Fdsh::Pvc::Dmf::Request::StoreRequest.new.call({ family_hash: family_hash, job_id: "dmf_request_1234" })
@job = Transmittable::Job.where(key: :dmf_request).last
@result = described_class.new.call({ job_id: @job.id, transactions_per_file: 5000 })
@result = described_class.new.call({ job_id: "dmf_request_1234", transactions_per_file: 5000 })
end

context "process success" do
Expand Down

0 comments on commit 5f466e2

Please sign in to comment.