summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-11-07 21:26:52 +0100
committerDaniel Friesel <derf@finalrewind.org>2013-11-07 21:26:52 +0100
commit43a01bc21db61bc975c2c0327a82ac62810df491 (patch)
treec5c36debb6734f13b24424793c175896f8b6c3df
parent50985cafee41db2942c50e8bc4a80cbc13a97030 (diff)
allow number of workers to be set via ENV
-rw-r--r--cgi/index.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index e1abec5..b2ded48 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -38,7 +38,7 @@ sub handle_request {
my $via = $self->stash('via');
my @platforms = split( /,/, $self->param('platforms') // q{} );
- my $template = $self->param('mode') // 'multi';
+ my $template = $self->param('mode') // 'multi';
my $hide_low_delay = $self->param('hidelowdelay') // 0;
$self->stash( departures => [] );
@@ -92,12 +92,11 @@ sub handle_request {
if ( $info eq '+0' ) {
$info = undef;
}
- if ($hide_low_delay and $info) {
+ if ( $hide_low_delay and $info ) {
$info =~ s{ ^ (?: ca\. \s* )? \+ [ 1 2 3 4 ] $ }{}x;
}
if ($info) {
- $info
- =~ s{ ^ (?: ca\. \s* )? \+ (\d+) }{Verspätung ca $1 Min.}x;
+ $info =~ s{ ^ (?: ca\. \s* )? \+ (\d+) }{Verspätung ca $1 Min.}x;
}
push(
@departures,
@@ -162,7 +161,7 @@ app->config(
accepts => 10,
listen => ['http://*:8092'],
pid_file => '/tmp/db-fake.pid',
- workers => 2,
+ workers => $ENV{VRRFAKEDISPLAY_WORKERS} // 2,
},
);