Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pid missing when spawning by worker group #98

Closed
Hippoom opened this issue Mar 5, 2015 · 1 comment
Closed

pid missing when spawning by worker group #98

Hippoom opened this issue Mar 5, 2015 · 1 comment

Comments

@Hippoom
Copy link

Hippoom commented Mar 5, 2015

I'm trying to use the new spawner feature to handling different workloads.

I have two workers which are split into two groups:

node_workers:
  classes: NodeActionsWorker
  workers: 2
job_workers:
  classes: JobActionsWorker
  workers: 1

I start the ruby process to spawn workers

bundle exec ruby -e "require 'sneakers/spawner';Sneakers::Spawner.spawn"

The processes list below

ps -ef | grep sneakers
  501 24223     1   0  2:26PM ??         0:00.17 ruby /Users/twer/Workspace/ScaleWorks/vendor/bundle/ruby/1.9.1/bin/rake sneakers:run
  501 24225     1   0  2:26PM ??         0:00.20 ruby /Users/twer/Workspace/ScaleWorks/vendor/bundle/ruby/1.9.1/bin/rake sneakers:run
  501 24226 24223   0  2:26PM ??         0:00.19 ruby /Users/twer/Workspace/ScaleWorks/vendor/bundle/ruby/1.9.1/bin/rake sneakers:run
  501 24227 24225   0  2:26PM ??         0:00.19 ruby /Users/twer/Workspace/ScaleWorks/vendor/bundle/ruby/1.9.1/bin/rake sneakers:run
  501 24232 24225   0  2:26PM ??         0:00.14 ruby /Users/twer/Workspace/ScaleWorks/vendor/bundle/ruby/1.9.1/bin/rake sneakers:run

So far so good, but when I cat the pids, I found the one of the pids is missing:

cat tmp/pids/sneakers.pid
24225

Then I realize that the two work group share one global config:

# in config/initializers/sneaker.rb

Sneakers.configure  :pid_path => 'tmp/pids/sneakers.pid', 
                                  ##other config items  

I try to config pid_path within each worker, but it does not work.

@jondot
Copy link
Owner

jondot commented Aug 20, 2016

Closing as this appears to be solved.

@jondot jondot closed this as completed Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants