Sha256: 50e1732bacefdab4cd16ffd8068343a64496376f2d9dbccb13ce6d506a68e318

Contents?: true

Size: 463 Bytes

Versions: 32

Compression:

Stored size: 463 Bytes

Contents

#!/usr/bin/env ruby
#
# Used as an example of preloading in Einhorn blog post
# (https://stripe.com/blog/meet-einhorn). Program name ends in .rb in
# order to make explicit that it's written in Ruby, though this isn't
# actually necessary for preloading to work.
#
# Run as
#
# einhorn -p ./pool_worker.rb ./pool_worker.rb

puts "From PID #{$$}: loading #{__FILE__}"

def einhorn_main
  while true
    puts "From PID #{$$}: Doing some work"
    sleep 1
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
einhorn-0.7.4 example/pool_worker.rb
einhorn-0.7.3 example/pool_worker.rb
einhorn-0.7.2 example/pool_worker.rb
einhorn-0.7.1 example/pool_worker.rb
einhorn-0.7.0 example/pool_worker.rb
einhorn-0.6.5 example/pool_worker.rb
einhorn-0.6.4 example/pool_worker.rb
einhorn-0.6.3 example/pool_worker.rb
einhorn-0.6.2 example/pool_worker.rb
einhorn-0.6.1 example/pool_worker.rb
einhorn-0.6.0 example/pool_worker.rb
einhorn-0.5.7 example/pool_worker.rb
einhorn-0.5.6 example/pool_worker.rb
einhorn-0.5.5 example/pool_worker.rb
einhorn-0.5.4 example/pool_worker.rb
einhorn-0.5.3 example/pool_worker.rb
einhorn-0.5.2 example/pool_worker.rb
einhorn-0.5.1 example/pool_worker.rb
einhorn-0.5.0 example/pool_worker.rb
einhorn-0.4.9 example/pool_worker.rb