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

pulibrary / bibdata / b3c4a532-5da0-46f8-9c20-20018605a028

21 Mar 2025 08:11PM UTC coverage: 42.257% (-49.9%) from 92.185%
b3c4a532-5da0-46f8-9c20-20018605a028

push

circleci

sandbergja
Move various gems from the default Gemfile group to a more appropriate group

1599 of 3784 relevant lines covered (42.26%)

2.56 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
1
module Import
×
2
  module Partner
×
3
    class FullCallbacks
×
4
      def overall_success(_status, options)
×
5
        event = Event.find(options['event_id'])
×
6
        Dump.generated_date(event.dump.id)
×
7
        event.success = true
×
8
        event.finish = Time.now.utc
×
9
        event.save!
×
10
      end
×
11

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

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

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

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