Sha256: 550af6e7040a8dc73cad4115cee32170b0836507f06741021c7f728e03ac8c41

Contents?: true

Size: 693 Bytes

Versions: 2

Compression:

Stored size: 693 Bytes

Contents

Inferno::Application.boot(:validator) do
  init do
    use :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'

    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

2 entries across 2 versions & 1 rubygems

Version Path
inferno_core-0.4.35 lib/inferno/config/boot/validator.rb
inferno_core-0.4.34 lib/inferno/config/boot/validator.rb