Sha256: 34caba03bdc35c50a7938059c62316a0b71b67027c44beb639b7559b9f186637

Contents?: true

Size: 684 Bytes

Versions: 6

Compression:

Stored size: 684 Bytes

Contents

# Example: how to run sidekiq daemon

def sidekiq_process(proxy, name)
  rails_env = proxy.env['RAILS_ENV']

  proxy.process(name) do
    start_command "bin/sidekiq -e #{rails_env} -C ./config/sidekiq.#{rails_env}.yml"
    pid_file "tmp/pids/#{name}.pid"
    stdall "log/#{name}.log"
    daemonize true
    stop_signals [:USR1, 0, :TERM, 10.seconds, :KILL]

    check :cpu, :every => 30, :below => 100, :times => 5
    check :memory, :every => 30, :below => 300.megabytes, :times => 5
  end
end

Eye.application :sidekiq_test do
  working_dir File.expand_path(File.join(File.dirname(__FILE__), %w[ processes ]))
  env "RAILS_ENV" => 'production'

  sidekiq_process self, :sidekiq
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
eye-0.8.pre2 examples/sidekiq.eye
eye-0.8.pre examples/sidekiq.eye
eye-0.7 examples/sidekiq.eye
eye-0.7.pre examples/sidekiq.eye
eye-0.6.4 examples/sidekiq.eye
eye-0.6.3 examples/sidekiq.eye