[Bio] / FigKernelScripts / run_peg_job_worker.pl Repository:
ViewVC logotype

View of /FigKernelScripts/run_peg_job_worker.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Thu Feb 10 16:57:33 2005 UTC (15 years, 3 months ago) by olson
Branch: MAIN
Changes since 1.1: +4 -83 lines
Change the test worker to use Cluster.pm instead of inline code.

#
# Worker process.
#
# Pulls pegs from the table, works on them with the given script, writes results back.
#
# usage: run_peg_job_worker tablename
#

use FIG;
use strict;
use Cluster;

my($table) = @ARGV;

if ($table eq "")
{
    die "Usage: $0 tablename\n";
}

my $fig = new FIG;
my $jobmgr = new Cluster::DBJobMgr($fig, $table);

my $what = 0;
my $worker = `hostname`;
chomp($worker);
$worker .= ":$$";

while (1)
{
    my $work = $jobmgr->get_work($worker);
    my $output = "finished $work $what\n";
    $what++;
    $jobmgr->work_done($work, $output);
}


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3