Sha256: b3b110e42b9635f5e395f303431d063fd612bb1029335fbb84d2a4db40edb32b

Contents?: true

Size: 587 Bytes

Versions: 90

Compression:

Stored size: 587 Bytes

Contents

module Katello
  module Middleware
    class OrganizationCreatedEnforcer
      def initialize(app)
        @app = app
        @all_organizations_created = false
      end

      def call(env)
        unless @all_organizations_created
          begin
            Katello::OrganizationCreator.create_all_organizations!
            @all_organizations_created = true
          rescue Katello::Errors::CandlepinNotRunning, Katello::Errors::PingError
            ::Katello::UINotifications::SystemError.deliver!({})
          end
        end
        @app.call(env)
      end
    end
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
katello-4.14.2 lib/katello/middleware/organization_created_enforcer.rb
katello-4.15.0 lib/katello/middleware/organization_created_enforcer.rb
katello-4.15.0.rc2 lib/katello/middleware/organization_created_enforcer.rb
katello-4.15.0.rc1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.14.1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.14.0 lib/katello/middleware/organization_created_enforcer.rb
katello-4.14.0.rc3 lib/katello/middleware/organization_created_enforcer.rb
katello-4.14.0.rc2 lib/katello/middleware/organization_created_enforcer.rb
katello-4.14.0.rc1.1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.14.0.rc1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.13.1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.13.0 lib/katello/middleware/organization_created_enforcer.rb
katello-4.12.1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.13.0.rc1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.12.0 lib/katello/middleware/organization_created_enforcer.rb
katello-4.12.0.rc3 lib/katello/middleware/organization_created_enforcer.rb
katello-4.12.0.rc2 lib/katello/middleware/organization_created_enforcer.rb
katello-4.12.0.rc1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.11.1 lib/katello/middleware/organization_created_enforcer.rb
katello-4.11.0 lib/katello/middleware/organization_created_enforcer.rb