# 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 );
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;
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;