[Jifty-commit] r3110 - in jifty/trunk: lib/Jifty/Server lib/Jifty/Server/Prefork

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Apr 7 00:22:37 EDT 2007


Author: jesse
Date: Sat Apr  7 00:22:29 2007
New Revision: 3110

Added:
   jifty/trunk/lib/Jifty/Server/Prefork/
   jifty/trunk/lib/Jifty/Server/Prefork.pm
   jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm
Modified:
   jifty/trunk/   (props changed)

Log:
 r54553 at dhcp207:  jesse | 2007-04-07 00:22:09 -0400
 * Preforking server support for Jifty::Server


Added: jifty/trunk/lib/Jifty/Server/Prefork.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Server/Prefork.pm	Sat Apr  7 00:22:29 2007
@@ -0,0 +1,29 @@
+package Jifty::Server::Prefork;
+use Net::Server::Prefork ();
+use base 'Jifty::Server';
+
+=head1 NAME
+
+Jifty::Server::Prefork - Jifty::Server that supports multiple connections
+
+=head1 SYNOPSIS
+
+In your F<etc/config.yml>:
+
+  framework:
+    Web:
+      ServerClass: Jifty::Server::Prefork
+
+=head1 METHODS
+
+=head2 net_server
+
+This module depends on the L<Net::Server::Prefork> module, which is part of
+the L<Net::Server> CPAN distribution.
+
+=cut
+
+sub net_server { 'Jifty::Server::Prefork::NetServer' }
+
+
+1;

Added: jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Server/Prefork/NetServer.pm	Sat Apr  7 00:22:29 2007
@@ -0,0 +1,10 @@
+
+package Jifty::Server::Prefork::NetServer;
+
+use base 'Net::Server::PreFork';
+
+sub child_init_hook {
+	Jifty->setup_database_connection();
+}
+
+1;


More information about the Jifty-commit mailing list