Commit 588aab07 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

The Worker defines the temp directory, not the Process

parent f55b0505
......@@ -600,9 +600,7 @@ sub worker_temp_directory {
sub worker_temp_directory_name {
my $self = shift @_;
my $username = $ENV{'USER'};
my $worker_id = $self->worker ? $self->worker->dbID : "standalone.$$";
return "/tmp/worker_${username}.${worker_id}/";
return $self->worker->temp_directory_name;
}
......
......@@ -885,4 +885,12 @@ sub set_log_directory_name {
}
sub temp_directory_name {
my $self = shift @_;
my $worker_id = $self->adaptor ? $self->dbID : 'standalone.'.$self->process_id;
return sprintf('/tmp/worker_%s_%s.%s', $self->meadow_user, $self->hive_pipeline->hive_pipeline_name, $worker_id);
}
1;
Markdown is supported
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