Sha256: 0d6ebdfa32f039b0f66b2bef3ca1c4e3aa244d667b1f1a084ab7aa8a9ece96eb

Contents?: true

Size: 484 Bytes

Versions: 10

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

require 'griffin/listener'

module Griffin
  module Engine
    module Worker
      def before_fork
        @listener = Griffin::Listener.new(config[:bind], config[:port])
        server.core.before_run(worker_id)
      end

      def run
        server.core.run(@listener.listen)
      ensure
        @listener.close
      end

      def stop
        server.core.shutdown
      end

      # def after_fork; end
      # def reload; end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
griffin-0.2.0 lib/griffin/engine/worker.rb
griffin-0.1.9 lib/griffin/engine/worker.rb
griffin-0.1.8 lib/griffin/engine/worker.rb
griffin-0.1.7 lib/griffin/engine/worker.rb
griffin-0.1.6 lib/griffin/engine/worker.rb
griffin-0.1.5 lib/griffin/engine/worker.rb
griffin-0.1.4 lib/griffin/engine/worker.rb
griffin-0.1.3 lib/griffin/engine/worker.rb
griffin-0.1.2 lib/griffin/engine/worker.rb
griffin-0.1.1 lib/griffin/engine/worker.rb