From: Tara L Andrews Date: Wed, 26 Sep 2012 03:54:19 +0000 (+0200) Subject: switch IDP scripts to use better port 4730 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f8397947b3a1d559257ac5b1d46ffb6de4bd718;p=scpubgit%2Fstemmatology.git switch IDP scripts to use better port 4730 --- diff --git a/analysis/idp_server/graphcalc.cgi b/analysis/idp_server/graphcalc.cgi index 7edf758..d0cd1f4 100755 --- a/analysis/idp_server/graphcalc.cgi +++ b/analysis/idp_server/graphcalc.cgi @@ -29,7 +29,7 @@ error( 400, 'Content type must be application/json' ) # Get the post data, and decode it according to the given character set my $jsonstr = decode( $encoding, $q->param('POSTDATA') ); $jsonstr =~ s/\&/\n/g; -# TODO eval this; if it breaks return an error. +# Validate the JSON my $request; try { $request = from_json( $jsonstr ); @@ -84,7 +84,7 @@ foreach my $p ( @problems ) { if( @needcalc ) { my $arg = join( ',', map { $_->object_key } @needcalc ); my $client = Gearman::Client->new; - $client->job_servers( '127.0.0.1' ); + $client->job_servers( '127.0.0.1:4730' ); my $task = $client->dispatch_background( run_idp => $arg ); # See if it finishes quickly my $wait = 3; diff --git a/analysis/idp_server/graphcalc_worker.pl b/analysis/idp_server/graphcalc_worker.pl index 320c5cd..1cf2549 100755 --- a/analysis/idp_server/graphcalc_worker.pl +++ b/analysis/idp_server/graphcalc_worker.pl @@ -23,7 +23,7 @@ my @idp_programs = qw/ findGroupings findClasses /; my $witness_map = {}; my $worker = Gearman::Worker->new(); -$worker->job_servers('127.0.0.1'); +$worker->job_servers('127.0.0.1:4730'); $worker->register_function( run_idp => \&run_idp ); $worker->work while 1;