[Bio] / FigKernelPackages / ServerThing.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/ServerThing.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10, Tue Nov 3 21:20:07 2009 UTC revision 1.11, Wed Nov 25 21:38:05 2009 UTC
# Line 13  Line 13 
13      use CGI;      use CGI;
14      no warnings qw(once);      no warnings qw(once);
15    
16        # Maximum number of requests to run per invocation.
17        use constant MAX_REQUESTS => 5000;
18    
19  =head1 General Server Helper  =head1 General Server Helper
20    
21  This package provides a method-- I<RunServer>-- that can be called from a CGI  This package provides a method-- I<RunServer>-- that can be called from a CGI
# Line 37  Line 40 
40              # Here we're doing Fast CGI. In this case, the tracing key is the              # Here we're doing Fast CGI. In this case, the tracing key is the
41              # server name.              # server name.
42              ETracing($serverName);              ETracing($serverName);
43              # Loop through the fast CGI requests.              # Count the number of requests.
44                my $requests = 0;
45                # Loop through the fast CGI requests. If we have request throttling,
46                # we exit after a maximum number of requests has been exceeded.
47              require CGI::Fast;              require CGI::Fast;
48              while ($cgi = new CGI::Fast()) {              while ($cgi = new CGI::Fast() &&
49                       (MAX_REQUESTS == 0 || ++$requests < MAX_REQUESTS)) {
50                  RunRequest($cgi, $serverName);                  RunRequest($cgi, $serverName);
51              }              }
52          } else {          } else {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3