Skip to content

Commit

Permalink
testing for job creation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsparkes committed Feb 28, 2023
1 parent b4cec53 commit 02fc707
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/javascript/shared/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ const resources = [
},
options: {},
},
{
resource: "bioscan_job",
attributes: {
barcode: "",
},
options: {},
},
{
resource: "comment",
attributes: {
Expand Down
11 changes: 10 additions & 1 deletion app/models/sequencescape_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class SequencescapeSubmission
def save
return false unless valid?

generate_submissions
# generate_submissions
test_job_creation
end

# @return [String] template_uuid: The uuid of the submission template to use
Expand Down Expand Up @@ -139,6 +140,14 @@ def generate_submissions

# rubocop:enable Metrics/AbcSize

def test_job_creation
puts "DEBUG: limber creating bioscan job"
# TODO: what does this return?
# TODO: If we trigger this from a Limber button how do we display a message to user?
binding.pry
Sequencescape::Api::V2::BioscanJob.create(barcode: '12345678')
end

def submission_template
api.order_template.find(template_uuid)
end
Expand Down
4 changes: 4 additions & 0 deletions app/sequencescape/sequencescape/api/v2/bioscan_job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

class Sequencescape::Api::V2::BioscanJob < Sequencescape::Api::V2::Base
end

0 comments on commit 02fc707

Please sign in to comment.