Sha256: 10abfca9fe113a55440be2e5a48bee581fecfdaca5a61a1c5a47fa7f79378ead
Contents?: true
Size: 709 Bytes
Versions: 16
Compression:
Stored size: 709 Bytes
Contents
# frozen_string_literal: true module GoodJob class ProbeServer class WebrickHandler def initialize(app, options = {}) @app = app @port = options[:port] @logger = options[:logger] @handler = ::Rack::Handler.get('webrick') end def stop @handler&.shutdown end def running? @handler&.instance_variable_get(:@server)&.status == :Running end def build_future Concurrent::Future.new(args: [@handler, @port, GoodJob.logger]) do |thr_handler, thr_port, thr_logger| thr_handler.run(@app, Port: thr_port, Host: '0.0.0.0', Logger: thr_logger, AccessLog: []) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems