wa0x6e/Fresque

Restart is not working properly

ruudk opened this issue · 1 comments

Hi,

When I start 5 workers 2 times it has 10 workers started.

$ ./fresque start -n 5
Forking 5 new PHP Resque worker services (queue:default user:Ruud)

$ ./fresque start -n 5
Forking 5 new PHP Resque worker services (queue:default user:Ruud)

$ ./fresque stats
PHPResque Statistics

Jobs Stats
   Processed Jobs : 0
   Failed Jobs    : 0

Workers Stats
   Active Workers : 10

This is correct. But when I now hit the restart button and look at the stats it shows me unexpected behavior:

$ ./fresque restart
Shutting down Resque Worker complete
Killing 10 workers ...
Killing 21057
Killing 21067
Killing 21085
Killing 21078
Killing 21079
Killing 21061
Killing 21053
Killing 21054
Killing 21090
Killing 21082
Forking 5 new PHP Resque worker services (queue:default user:Ruud)
Forking 1 new PHP Resque worker service (queue:default user:Ruud)

$ ./fresque stats
PHPResque Statistics

Jobs Stats
   Processed Jobs : 0
   Failed Jobs    : 0

Workers Stats
   Active Workers : 4
    Worker : iMacRuud.local:21130:default
     - Started on     : Fri Aug 03 08:06:15 UTC 2012
     - Uptime         : less than a minute
     - Processed Jobs : 0
     - Failed Jobs    : 0
    Worker : iMacRuud.local:21134:default
     - Started on     : Fri Aug 03 08:06:15 UTC 2012
     - Uptime         : less than a minute
     - Processed Jobs : 0
     - Failed Jobs    : 0
    Worker : iMacRuud.local:21138:default
     - Started on     : Fri Aug 03 08:06:15 UTC 2012
     - Uptime         : less than a minute
     - Processed Jobs : 0
     - Failed Jobs    : 0
    Worker : iMacRuud.local:21132:default
     - Started on     : Fri Aug 03 08:06:15 UTC 2012
     - Uptime         : less than a minute
     - Processed Jobs : 0
     - Failed Jobs    : 0

Why does it now has 4 workers instead of 10? Sometimes its 6 workers. I don't get it.

Fixed