Sha256: d5bdf7357158c695d0c9978b3738ae5e0b8f62bdebf460baa1cfb118bcbf909f

Contents?: true

Size: 810 Bytes

Versions: 14

Compression:

Stored size: 810 Bytes

Contents

Inferno::Application.register_provider(:validator) do
  prepare do
    target_container.start :suites

    # This process should only run once, to start one job per validator,
    # so skipping it on workers will start it only once from the "web" process
    next if Sidekiq.server?

    next if ENV['APP_ENV'] == 'test'

    next if ENV.fetch('INITIALIZE_VALIDATOR_SESSIONS', 'true').casecmp?('false')

    Inferno::Repositories::TestSuites.new.all.each do |suite|
      suite.fhir_validators.each do |name, validators|
        validators.each_with_index do |validator, index|
          if validator.is_a? Inferno::DSL::FHIRResourceValidation::Validator
            Inferno::Jobs.perform(Inferno::Jobs::InvokeValidatorSession, suite.id, name.to_s, index)
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
inferno_core-0.6.1 lib/inferno/config/boot/validator.rb
inferno_core-0.6.0 lib/inferno/config/boot/validator.rb
inferno_core-0.5.4 lib/inferno/config/boot/validator.rb
inferno_core-0.5.3 lib/inferno/config/boot/validator.rb
inferno_core-0.5.2 lib/inferno/config/boot/validator.rb
inferno_core-0.5.1 lib/inferno/config/boot/validator.rb
inferno_core-0.5.0 lib/inferno/config/boot/validator.rb
inferno_core-0.4.44 lib/inferno/config/boot/validator.rb
inferno_core-0.4.43 lib/inferno/config/boot/validator.rb
inferno_core-0.4.42 lib/inferno/config/boot/validator.rb
inferno_core-0.4.41 lib/inferno/config/boot/validator.rb
inferno_core-0.4.40 lib/inferno/config/boot/validator.rb
inferno_core-0.4.39 lib/inferno/config/boot/validator.rb
inferno_core-0.4.38 lib/inferno/config/boot/validator.rb