diff options
author | Daniel Friesel <derf@finalrewind.org> | 2013-11-07 21:26:52 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2013-11-07 21:26:52 +0100 |
commit | 43a01bc21db61bc975c2c0327a82ac62810df491 (patch) | |
tree | c5c36debb6734f13b24424793c175896f8b6c3df /cgi/index.pl | |
parent | 50985cafee41db2942c50e8bc4a80cbc13a97030 (diff) |
allow number of workers to be set via ENV
Diffstat (limited to 'cgi/index.pl')
-rw-r--r-- | cgi/index.pl | 9 |
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, }, ); |