parallel: bug with --dryrun and virgin jobs.

This commit is contained in:
Ole Tange 2013-04-11 21:54:57 +02:00
parent 0706a95802
commit 6e8247d6d1

View file

@ -392,7 +392,7 @@ sub spreadstdin {
if(not $anything_written and not eof($in)) {
# Nothing was written - maybe the block size < record size?
# Increase blocksize exponentially
$blocksize = ceil($blocksize * 1.3);
$blocksize = ceil($blocksize * 1.3 + 1);
::warning("A full record was not matched in a block. Increasing to --blocksize ".$blocksize."\n");
}
}
@ -4248,13 +4248,24 @@ sub print {
my $self = shift;
::debug(">>joboutput ".$self->replaced()."\n");
if($opt::pipe and $self->virgin()) {
# Nothing was printed to this job:
# cleanup tmp files if --files was set
unlink $self->{'stdoutfilename'};
return;
}
if($opt::dryrun) {
# Nothing was printed to this job:
# cleanup tmp files if --files was set
unlink $self->{'stdoutfilename'};
}
# Only relevant for grouping
$Global::grouped or return;
my $out = $self->stdout();
my $err = $self->stderr();
my $command = $self->sshlogin_wrap();
if($Global::joblog and not ($opt::pipe and $self->virgin())) {
if($Global::joblog and not $opt::pipe) {
my $cmd;
if($Global::verbose <= 1) {
$cmd = $self->replaced();