Permalink
Browse files

added option for workers with default workers

  • Loading branch information...
1 parent 83a5292 commit 1b0aa847d8bff2d4a2b30ab254b11240da957c9d Puneet Kishor committed Nov 11, 2011
Showing with 13 additions and 5 deletions.
  1. +7 −2 web_ctl.conf
  2. +6 −3 web_ctl.pl
View
@@ -1,4 +1,5 @@
%CFG = (
+ default_workers => 5,
test => 0,
host => 'http://127.0.0.1',
root => '/Volumes/roller/Users/punkish',
@@ -13,12 +14,16 @@
blog => {port => 5000},
macrostrat => {port => 5001},
macromap => {port => 5002},
- geomaps => {port => 5003},
+ geomaps => {port => 5003, workers => 10},
pbdb => {port => 5004},
sue => {port => 5005},
punkish => {port => 5006},
humanesettlements => {port => 5007},
geoplates => {port => 5008},
- ecoval => {port => 5009}
+ ecoval => {port => 5009},
+ trees => {port => 5010},
+ sst => {port => 5011},
+ earthbase => {port => 5012},
+ waterisotopes => {port => 5013}
}
);
View
@@ -36,6 +36,7 @@
# web_ctl.conf
%CFG = (
+ default_workers => 5,
test => 0,
host => 'http://127.0.0.1',
root => '/Volumes/roller/Users/punkish',
@@ -50,7 +51,7 @@
blog => {port => 5000},
macrostrat => {port => 5001},
macromap => {port => 5002},
- geomaps => {port => 5003},
+ geomaps => {port => 5003, workers => 10},
pbdb => {port => 5004},
sue => {port => 5005},
punkish => {port => 5006},
@@ -69,6 +70,7 @@
exit(1);
}
+my $default_workers = $CFG::CFG{default_workers};
my $test = $CFG::CFG{test};
my $host = $CFG::CFG{host};
my $root = $CFG::CFG{root};
@@ -259,6 +261,7 @@ sub start {
my ($app) = @_;
my $port = $apps{$app}->{port};
+ my $workers = $apps{$app}->{workers} || $default_workers;
my $access = $app . '_access.log';
my $error = $app . '_error.log';
my $env = $opt_e;
@@ -299,7 +302,7 @@ sub start {
"plackup",
"-s Starman",
"-p $port",
- "-w 10",
+ "-w $workers",
"-E $env",
"--access-log $dir_logs/$access",
"--error-log $dir_logs/$error",
@@ -338,4 +341,4 @@ sub trim {
$string =~ s/\s+$//;
return $string;
}
-}
+}

0 comments on commit 1b0aa84

Please sign in to comment.