AC-MrGamoo
view release on metacpan or search on metacpan
lib/AC/MrGamoo/Job/Plan.pm view on Meta::CPAN
my @todo = sort { $b->{size} <=> $a->{size} } @{$filemap->{$s}};
while( @todo ){
my @file;
my %alt;
my $tot;
while( @todo && ($tot < $sizelimit) ){
my $f = shift @todo;
$tot += $f->{size};
push @file, $f->{filename};
# backup plan?
my $as = $f->{location}[1];
$alt{$f->{filename}} = $as if $as;
}
my $id = unique();
push @maptask, AC::MrGamoo::Job::TaskInfo->new( $job,
id => $id,
phase => 'map',
server => $s,
infile => \@file,
( run in 0.590 second using v1.01-cache-2.11-cpan-49f99fa48dc )