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

pulibrary / bibdata / 2b274cd3-5d04-438b-ba47-a8d5eeac0c16

11 Aug 2025 04:31PM UTC coverage: 87.857% (-4.3%) from 92.158%
2b274cd3-5d04-438b-ba47-a8d5eeac0c16

Pull #2830

circleci

sandbergja
[#2746] Begin indexing access restriction notes

Advances #2746
Pull Request #2830: [#2746] Begin indexing access restriction notes

3350 of 3813 relevant lines covered (87.86%)

668.76 hits per line

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

84.62
/app/services/alma/indexer.rb
1
module Alma
1✔
2
  class Indexer
1✔
3
    attr_reader :solr_url
1✔
4

5
    def initialize(solr_url:)
1✔
6
      @solr_url = solr_url
16✔
7
    end
8

9
    def index_file(file_path, flags = '')
1✔
10
      # nosemgrep
11
      stdout, stderr, status = Open3.capture3("RUBY_YJIT_ENABLE=yes traject #{flags} -c marc_to_solr/lib/traject_config.rb #{file_path} -u #{solr_url} -w Traject::PulSolrJsonWriter")
16✔
12
      if stderr.include?('FATAL') && !status.success?
16✔
13
        Rails.logger.error(stderr)
16✔
14
        raise "Traject indexing failed for #{file_path}: #{stderr}"
16✔
15
      else
16
        Rails.logger.info("Successfully indexed file #{file_path}")
×
17
      end
18
    end
19

20
    def index_file_debug(file_path, flags = '')
1✔
21
      index_file file_path, "--debug-mode #{flags}"
×
22
    end
23
  end
24
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