$command .= "--env=\QCRUNCH_SRC=/tmp/crunch-src\E ";
$command .= "\Q$docker_hash\E ";
$command .= "stdbuf --output=0 --error=0 ";
- $command .= "perl - ";
+ $command .= "perl - " if ($build_script);
$command .= "/tmp/crunch-src/crunch_scripts/" . $Job->{"script"};
} else {
# Non-docker run
$command .= "crunchstat -cgroup-root=/sys/fs/cgroup -poll=10000 ";
$command .= "stdbuf --output=0 --error=0 ";
- $command .= "perl - ";
+ $command .= "perl - " if ($build_script);
$command .= "$ENV{CRUNCH_SRC}/crunch_scripts/" . $Job->{"script"};
}
my $output = $arv->{'collections'}->{'create'}->execute('collection' => {
'manifest_text' => $orig_manifest_text,
});
- Log(undef, "output " . $output->{portable_data_hash});
+ Log(undef, "output uuid " . $output->{uuid});
+ Log(undef, "output hash " . $output->{portable_data_hash});
$Job->update_attributes('output' => $output->{portable_data_hash}) if $job_has_uuid;
};
if ($@) {
return if $justcheckpoint; # checkpointing is not relevant post-Warehouse.pm
$local_logfile->flush;
- my $cmd = "arv-put --filename ''\Q$keep_logfile\E "
+ my $cmd = "arv-put --portable-data-hash --filename ''\Q$keep_logfile\E "
. quotemeta($local_logfile->filename);
my $loglocator = `$cmd`;
die "system $cmd failed: $?" if $?;
open L, ">", "$destdir.lock" or die "$destdir.lock: $!";
flock L, LOCK_EX;
if (readlink ("$destdir.commit") eq $commit && -d $destdir) {
- exit 0;
+ if (@ARGV) {
+ exec(@ARGV);
+ die "Cannot exec `@ARGV`: $!";
+ } else {
+ exit 0;
+ }
}
unlink "$destdir.commit";
if (@ARGV) {
exec(@ARGV);
+ die "Cannot exec `@ARGV`: $!";
} else {
exit 0;
}