Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl-hive
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl-hive
Commits
02e233e1
Commit
02e233e1
authored
12 years ago
by
Leo Gordon
Browse files
Options
Downloads
Patches
Plain Diff
using PERLs File::Path::make_path instead of mkdir-p to create hive_log_dir
parent
ede79d41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Hive/Queen.pm
+5
-3
5 additions, 3 deletions
modules/Bio/EnsEMBL/Hive/Queen.pm
with
5 additions
and
3 deletions
modules/Bio/EnsEMBL/Hive/Queen.pm
+
5
−
3
View file @
02e233e1
...
...
@@ -62,6 +62,7 @@ package Bio::EnsEMBL::Hive::Queen;
use
strict
;
use
POSIX
;
use
Clone
'
clone
';
use
File::
Path
'
make_path
';
use
Bio::EnsEMBL::Utils::
Argument
;
use
Bio::EnsEMBL::Utils::
Exception
;
...
...
@@ -127,15 +128,16 @@ sub create_new_worker {
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
(
$meadow_type
,
$meadow_name
,
$exec_host
,
$process_id
,
$resource_class_id
);
my
$worker_id
=
$self
->
dbc
->
db_handle
->
last_insert_id
(
undef
,
undef
,
'
worker
',
'
worker_id
')
or
die
"
Could not
create
a new worker
";
or
die
"
Could not
insert
a new worker
";
$sth
->
finish
;
if
(
$hive_log_dir
or
$worker_log_dir
)
{
my
$dir_revhash
=
dir_revhash
(
$worker_id
);
$worker_log_dir
||=
$hive_log_dir
.
'
/
'
.
(
$dir_revhash
?
"
$dir_revhash
/
"
:
'')
.
'
worker_id_
'
.
$worker_id
;
# Note: the following die-message will not reach the log files for circular reason!
system
("
mkdir -p
$worker_log_dir
")
&&
die
"
Could not create '
$worker_log_dir
' because: $!
";
eval
{
make_path
(
$worker_log_dir
);
}
and
die
"
Could not create '
$worker_log_dir
' directory : $@
";
my
$sth_add_log
=
$self
->
prepare
(
"
UPDATE worker SET log_dir=? WHERE worker_id=?
"
);
$sth_add_log
->
execute
(
$worker_log_dir
,
$worker_id
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment