Skip to content

Commit

Permalink
renamed manage event to wait
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 16, 2013
1 parent a21896e commit 273b29d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -33,7 +33,7 @@ sub run {
my $app = $prefork->load_app($ENV{HYPNOTOAD_APP});
$self->_config($app);
weaken $self;
$prefork->on(manage => sub { $self->_manage });
$prefork->on(wait => sub { $self->_manage });
$prefork->on(reap => sub { $self->_reap(pop) });
$prefork->on(finish => sub { $self->{finished} = 1 });

Expand Down
20 changes: 10 additions & 10 deletions lib/Mojo/Server/Prefork.pm
Expand Up @@ -104,7 +104,7 @@ sub _manage {
elsif (!keys %{$self->{pool}}) { return delete $self->{running} }

# Manage workers
$self->emit('manage')->_heartbeat;
$self->emit('wait')->_heartbeat;
my $log = $self->app->log;
while (my ($pid, $w) = each %{$self->{pool}}) {

Expand Down Expand Up @@ -330,15 +330,6 @@ Emitted when the server shuts down.
Emitted when a heartbeat message has been received from a worker.
=head2 manage
$prefork->on(manage => sub {
my $prefork = shift;
...
});
Emitted when the server starts managing worker processes.
=head2 reap
$prefork->on(reap => sub {
Expand All @@ -357,6 +348,15 @@ Emitted when a child process dies.
Emitted when a worker process is spawned.
=head2 wait
$prefork->on(wait => sub {
my $prefork = shift;
...
});
Emitted when the server starts waiting for new heartbeat messages.
=head1 ATTRIBUTES
L<Mojo::Server::Prefork> inherits all attributes from L<Mojo::Server::Daemon>
Expand Down

0 comments on commit 273b29d

Please sign in to comment.