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

pulibrary / bibdata / 83785282-b493-4102-b828-c01dc1ed4e60

31 Dec 2024 07:48PM UTC coverage: 91.93% (+0.07%) from 91.859%
83785282-b493-4102-b828-c01dc1ed4e60

Pull #2563

circleci

maxkadel
Create more nested batches
Pull Request #2563: I2321 Shift SCSB full index tasks into separate background jobs

184 of 188 new or added lines in 11 files covered. (97.87%)

4 existing lines in 1 file now uncovered.

3497 of 3804 relevant lines covered (91.93%)

366.53 hits per line

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

81.25
/app/models/scsb/partner_updates/callback.rb
1
module Scsb
1✔
2
  class PartnerUpdates
1✔
3
    class Callback
1✔
4
      # called by batch.on(:success)
5
      def on_success(_status, options)
1✔
6
        event = Event.find(options['event_id'])
1✔
7
        event.success = true
1✔
8
        event.save!
1✔
9
        Scsb::PartnerUpdates::Update.generated_date(dump_id: event.dump.id)
1✔
10
      end
11

12
      def on_complete(status, options)
1✔
13
        event_id = options['event_id']
1✔
14
        event = Event.find(event_id)
1✔
15
        return unless status.failures != 0
1✔
16

NEW
17
        event.success = false
×
NEW
18
        event.error << "Sidekiq batch: #{status.bid} completed with errors for event_id: #{event_id}"
×
NEW
19
        event.save!
×
20
      end
21

22
      def finished_downloading(status, _options)
1✔
23
        # overall = Sidekiq::Batch.new(status.parent_bid)
24
      end
25
    end
26
  end
27
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