cooperative-computing-lab/cctools — pull request #620 by btovar (2014-11-24 14:40:35+00:00)
Title: Work Queue's Perl object-oriented bindings.

Queues and tasks are now garbage collected when out of scope.
Added easy access to statistics and resource summaries.

Synopsis:

use Work_Queue;

my $q = Work_Queue->new($port);
$q->set_debug_flag('all');
$q->set_debug_config_file('dbg.txt');

$q->specify_name('project_name');

$q->enable_monitoring;

my $t = Work_Queue::Task->new($command);
$t->specify_input_file(local_name => 'some_name', remote_name => 'some_other_name');
$t->specify_output_file(local_name => 'some_name'); # Could be: $t->specify_output_file('some_name');

$q->submit($t);

...

my $stats = $q->stats;
print $stats->{tasks_running}, '\n';

...

$t = $q->wait(5);

...

my $resources = $t->resources_measured;
print $resources->{resident_memory}, '\n';