[Catalyst-commits] r8798 - in trunk/Catalyst-Engine-HTTP-Prefork: . lib/Catalyst/Engine/HTTP

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Mon Dec 8 21:29:58 GMT 2008


Author: andyg
Date: 2008-12-08 21:29:55 +0000 (Mon, 08 Dec 2008)
New Revision: 8798

Modified:
   trunk/Catalyst-Engine-HTTP-Prefork/Changes
   trunk/Catalyst-Engine-HTTP-Prefork/lib/Catalyst/Engine/HTTP/Prefork.pm
Log:
HTTP::Prefork 0.50

Modified: trunk/Catalyst-Engine-HTTP-Prefork/Changes
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/Changes	2008-12-08 21:28:20 UTC (rev 8797)
+++ trunk/Catalyst-Engine-HTTP-Prefork/Changes	2008-12-08 21:29:55 UTC (rev 8798)
@@ -1,4 +1,9 @@
 This file documents the revision history for Catalyst::Engine::HTTP::Prefork.
 
+0.50    2008-12-08 16:30:00
+        - Added graceful_restart option which allows children to finish
+          the current request before exiting during a SIGHUP.
+        - Fixed typo in Net::Server option max_requests.
+
 0.01    2008-04-04 21:30:00
         - Initial release.

Modified: trunk/Catalyst-Engine-HTTP-Prefork/lib/Catalyst/Engine/HTTP/Prefork.pm
===================================================================
--- trunk/Catalyst-Engine-HTTP-Prefork/lib/Catalyst/Engine/HTTP/Prefork.pm	2008-12-08 21:28:20 UTC (rev 8797)
+++ trunk/Catalyst-Engine-HTTP-Prefork/lib/Catalyst/Engine/HTTP/Prefork.pm	2008-12-08 21:29:55 UTC (rev 8798)
@@ -17,7 +17,7 @@
 use constant CHUNKSIZE    => 64 * 1024;
 use constant READ_TIMEOUT => 5;
 
-our $VERSION = '0.01';
+our $VERSION = '0.50';
 
 sub run {
     my ( $self, $class, $port, $host, $options ) = @_;
@@ -35,15 +35,16 @@
     @ARGV = @{ $options->{argv} };
     
     $self->SUPER::run(
-        port              => $port || 3000,
-        host              => $host || '*',
-        serialize         => 'flock',
-        log_level         => DEBUG ? 4 : 1,
-        min_servers       => $options->{min_servers}       || 5,
-        min_spare_servers => $options->{min_spare_servers} || 2,
-        max_spare_servers => $options->{max_spare_servers} || 10,
-        max_servers       => $options->{max_servers}       || 50,
-        max_reqeusts      => $options->{max_requests}      || 1000,
+        port                       => $port || 3000,
+        host                       => $host || '*',
+        serialize                  => 'flock',
+        log_level                  => DEBUG ? 4 : 1,
+        min_servers                => $options->{min_servers}       || 5,
+        min_spare_servers          => $options->{min_spare_servers} || 2,
+        max_spare_servers          => $options->{max_spare_servers} || 10,
+        max_servers                => $options->{max_servers}       || 50,
+        max_requests               => $options->{max_requests}      || 1000,
+        leave_children_open_on_hup => $options->{restart_graceful}  || 0,
     );
 }
 
@@ -378,6 +379,12 @@
 requests.  This is a limitation of Net::Server and may be fixed in a future
 version.
 
+=head2 restart_graceful
+
+This enables Net::Server's leave_children_open_on_hup option.  If set, the parent
+will not attempt to close child processes if the parent receives a SIGHUP.  Each
+child will exit as soon as possible after processing the current request if any.
+
 =head1 AUTHOR
 
 Andy Grundman, <andy at hybridized.org>




More information about the Catalyst-commits mailing list