From: Dobrica Pavlinusic Date: Fri, 6 May 2011 09:56:51 +0000 (+0200) Subject: increase gearman timeout to 15s X-Git-Url: http://git.rot13.org/?p=APKPM.git;a=commitdiff_plain;h=9a657ce1785cf803cb1186267c3947b07060e78a increase gearman timeout to 15s --- diff --git a/web_ui.pl b/web_ui.pl index 22d4455..6b9258b 100755 --- a/web_ui.pl +++ b/web_ui.pl @@ -29,6 +29,7 @@ get '/ping_http' => sub { my $gearman = MojoX::Gearman->new; #( ioloop => Mojo::IOLoop->singleton ); $gearman->server( $ENV{GEARMAN} || 'localhost:4730' ); +$gearman->timeout( 15 ); get '/ping_g' => sub { my $self = shift; @@ -93,6 +94,7 @@ get '/gnuplot' => sub { $sql =~ s/\s+(from|where|order|limit|join)/\n$1/gs; $self->param( sql => $sql ); + $gearman->timeout(15); my $ret = $gearman->req( 'SUBMIT_JOB', 'Store_sql', '', $sql ); die "no result for $sql" unless $ret;