Skip to content
Snippets Groups Projects
Commit 8c11f4e8 authored by Leo Gordon's avatar Leo Gordon
Browse files

unification of names

parent 8def947f
No related branches found
No related tags found
No related merge requests found
...@@ -304,15 +304,15 @@ sub last_check_in { ...@@ -304,15 +304,15 @@ sub last_check_in {
use Digest::MD5 qw(md5_hex); use Digest::MD5 qw(md5_hex);
sub output_dir { sub output_dir {
my ($self, $outdir) = @_; my ($self, $output_dir) = @_;
if ($outdir and (-d $outdir)) { if ($output_dir and (-d $output_dir)) {
my $worker_id = $self->worker_id; my $worker_id = $self->worker_id;
my (@hex) = md5_hex($worker_id) =~ m/\G(..)/g; my (@hex) = md5_hex($worker_id) =~ m/\G(..)/g;
# If you want more than one level of directories, change $hex[0] # If you want more than one level of directories, change $hex[0]
# below into an array slice. e.g @hex[0..1] for two levels. # below into an array slice. e.g @hex[0..1] for two levels.
$outdir = join('/', $outdir, $hex[0], 'worker_id' . $worker_id); $output_dir = join('/', $output_dir, $hex[0], "worker_id_${worker_id}" );
system("mkdir -p $outdir") && die "Could not create $outdir\n"; system("mkdir -p $output_dir") && die "Could not create $output_dir\n";
$self->{'_output_dir'} = $outdir; $self->{'_output_dir'} = $output_dir;
} }
return $self->{'_output_dir'}; return $self->{'_output_dir'};
} }
...@@ -629,13 +629,13 @@ sub redirect_job_output ...@@ -629,13 +629,13 @@ sub redirect_job_output
my $self = shift; my $self = shift;
my $job = shift; my $job = shift;
my $outdir = $self->output_dir(); my $output_dir = $self->output_dir();
return unless($outdir); return unless($output_dir);
return unless($job); return unless($job);
return unless($job->adaptor); return unless($job->adaptor);
$job->stdout_file($outdir . "/job_".$job->dbID.".out"); $job->stdout_file($output_dir . "/job_id_".$job->dbID.".out");
$job->stderr_file($outdir . "/job_".$job->dbID.".err"); $job->stderr_file($output_dir . "/job_id_".$job->dbID.".err");
close STDOUT; close STDOUT;
open STDOUT, ">".$job->stdout_file; open STDOUT, ">".$job->stdout_file;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment