Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
log when the manager process has been stopped
  • Loading branch information
kraih committed Apr 20, 2016
1 parent 147bf30 commit 8936972
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Changes
@@ -1,5 +1,7 @@

6.59 2016-04-11
6.59 2016-04-20
- Improved Mojo::Server::Prefork to log when the manager process has been
stopped.

6.58 2016-04-09
- Removed deprecated build_frame and parse_frame methods from
Expand Down
1 change: 1 addition & 0 deletions lib/Mojo/Server/Prefork.pm
Expand Up @@ -86,6 +86,7 @@ sub run {
$self->ioloop->max_accepts($self->accepts);
$self->{running} = 1;
$self->_manage while $self->{running};
$self->app->log->info("Manager $$ stopped");
}

sub _heartbeat { shift->{writer}->syswrite("$$:$_[0]\n") or exit 0 }
Expand Down
1 change: 1 addition & 0 deletions t/mojo/prefork.t
Expand Up @@ -85,6 +85,7 @@ like $log, qr/Manager $$ started/, 'right message';
like $log, qr/Creating process id file/, 'right message';
like $log, qr/Stopping worker $spawn[0] gracefully/, 'right message';
like $log, qr/Worker $spawn[0] stopped/, 'right message';
like $log, qr/Manager $$ stopped/, 'right message';
$prefork->app->log->unsubscribe(message => $cb);

# Process id file
Expand Down

0 comments on commit 8936972

Please sign in to comment.