Sha256: a46449b887615ffedabb67baa9293b784bd62a747929ec5ff16d972bc1f7b291

Contents?: true

Size: 350 Bytes

Versions: 4

Compression:

Stored size: 350 Bytes

Contents

module PumaWorkerKiller
  class AutoReap
    def initialize(timeout, reaper = Reaper.new)
      @timeout = timeout # seconds
      @reaper  = reaper
      @running = false
    end

    def start
      @running = true

      Thread.new do
        while @running
          sleep @timeout
          @reaper.reap
        end
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gitlab-puma_worker_killer-0.1.1.gitlab.1 lib/puma_worker_killer/auto_reap.rb
puma_worker_killer-0.1.1 lib/puma_worker_killer/auto_reap.rb
puma_worker_killer-0.1.0 lib/puma_worker_killer/auto_reap.rb
puma_worker_killer-0.0.7 lib/puma_worker_killer/auto_reap.rb