• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / pdc_describe / 9cd1579d-9684-4b66-ae83-9619a7d64644

pending completion
9cd1579d-9684-4b66-ae83-9619a7d64644

Pull #1094

circleci

GitHub
Merge branch 'main' into sidekiq-prod
Pull Request #1094: Adding redis and sidekiq

1628 of 2126 relevant lines covered (76.58%)

97.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/app/jobs/dspace_file_copy_job.rb
1
# frozen_string_literal: true
2
class DspaceFileCopyJob < ApplicationJob
1✔
3
  queue_as :default
1✔
4

5
  def perform(dspace_doi, s3_key, s3_size, work_id)
1✔
6
    work = Work.find(work_id)
×
7
    dspace_bucket_name = Rails.configuration.s3.dspace[:bucket]
×
8
    new_key = s3_key.gsub("#{dspace_doi}/".tr(".", "-"), work.s3_query_service.prefix)
×
9
    resp = work.s3_query_service.copy_file(source_key: "#{dspace_bucket_name}/#{s3_key}", target_bucket:  work.s3_query_service.bucket_name,
×
10
                                           target_key: new_key, size: s3_size)
11
    unless resp.successful?
×
12
      raise "Error copying #{s3_key} to work #{work_id} Response #{resp}"
×
13
    end
14
  end
15
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc