kamisama/Fresque — pull request #40 by joeholdcroft (2014-09-08 12:47:21+00:00)
Title: Fix kill when user differs to process owner

When running Fresque on my Vagrant box with the user set to `www-data` but running the commands as `vagrant`, I noticed that the `stop` command did not work.

It didn't report an error, but it did not output the green "Done" text next to each stopped worker. The output looked something like:

```
----------------
Stopping workers
----------------
Workers list
1) vagrant:8048:dispatched_orders, started 1 day and 2 hours ago
2) vagrant:8039:new_orders, started 1 day and 2 hours ago
all) Stop all workers

Worker to stop: all
stopping 8048 ...
stopping 8039 ...

```

I copied some code for running the command as another user from the `start` method. It might want some abstraction to avoid the repetition, but I wasn't sure what other commands might be effected.