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

pulibrary / bibdata / 1dcebae2-3318-4e77-bc53-82276e293354

02 May 2025 04:45PM UTC coverage: 28.256% (-63.9%) from 92.189%
1dcebae2-3318-4e77-bc53-82276e293354

push

circleci

sandbergja
Add basic infrastructure for compiling rust code

* Add a rake compile task to compile
* Run the rake task in CI
* Run the rake task before rspec tests with the rust tag, to provide quick feedback on rust changes in TDD cycles

2 of 7 new or added lines in 2 files covered. (28.57%)

2467 existing lines in 97 files now uncovered.

1089 of 3854 relevant lines covered (28.26%)

0.29 hits per line

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

0.0
/app/jobs/import/partner/full_callbacks.rb
UNCOV
1
module Import
×
UNCOV
2
  module Partner
×
UNCOV
3
    class FullCallbacks
×
UNCOV
4
      def overall_success(_status, options)
×
UNCOV
5
        event = Event.find(options['event_id'])
×
UNCOV
6
        Dump.generated_date(event.dump.id)
×
UNCOV
7
        event.success = true
×
UNCOV
8
        event.finish = Time.now.utc
×
UNCOV
9
        event.save!
×
UNCOV
10
      end
×
11

UNCOV
12
      def validate_csv_success(status, options)
×
UNCOV
13
        institution = options['institution']
×
UNCOV
14
        dump_id = options['dump_id']
×
UNCOV
15
        prefix = options['prefix']
×
UNCOV
16
        dump = Dump.find(dump_id)
×
17

UNCOV
18
        overall = Sidekiq::Batch.new(status.parent_bid)
×
UNCOV
19
        overall.jobs do
×
UNCOV
20
          download_full_file_batch = Sidekiq::Batch.new
×
UNCOV
21
          download_full_file_batch.description = "Download full dump for institution #{institution}"
×
UNCOV
22
          download_full_file_batch.on(:success, 'Import::Partner::FullCallbacks#download_file_success', 'dump_id' => dump_id, 'institution' => institution, 'prefix' => prefix)
×
UNCOV
23
          download_full_file_batch.jobs do
×
UNCOV
24
            Import::Partner::DownloadFullFileJob.perform_async(dump_id, institution, prefix)
×
UNCOV
25
          end
×
UNCOV
26
        end
×
UNCOV
27
      end
×
28

29
      # Empty callbacks in preparation for future further breaking down of background jobs
UNCOV
30
      def download_file_success(status, options); end
×
31

UNCOV
32
      def process_xml_file_success(_status, options)
×
33
        # unlink big zip file here
UNCOV
34
        zip_file = options['zip_file']
×
UNCOV
35
        File.unlink(zip_file) if File.exist?(zip_file)
×
UNCOV
36
      end
×
UNCOV
37
    end
×
UNCOV
38
  end
×
UNCOV
39
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