Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
8384b375
Commit
8384b375
authored
Oct 05, 2013
by
Leo Gordon
Browse files
using autoloaded update_x method instead of a direct SQL
parent
e4fbcf73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+6
-9
No files found.
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
8384b375
...
...
@@ -148,6 +148,9 @@ sub create_new_worker {
or
die
"
Could not insert a new worker
";
$sth
->
finish
;
my
$worker
=
$self
->
fetch_by_dbID
(
$worker_id
)
or
die
"
Could not fetch worker with dbID=
$worker_id
";
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
;
...
...
@@ -157,14 +160,10 @@ sub create_new_worker {
1
;
}
or
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
);
$sth_add_log
->
finish
;
$worker
->
log_dir
(
$worker_log_dir
);
$self
->
update_log_dir
(
$worker
);
# autoloaded
}
my
$worker
=
$self
->
fetch_by_dbID
(
$worker_id
)
or
die
"
Could not fetch worker with dbID=
$worker_id
";
$worker
->
init
;
if
(
defined
(
$job_limit
))
{
...
...
@@ -288,9 +287,7 @@ sub specialize_new_worker {
$worker
->
analysis_id
(
$analysis_id
);
my
$sth_update_analysis_id
=
$self
->
prepare
(
"
UPDATE worker SET analysis_id=? WHERE worker_id=?
"
);
$sth_update_analysis_id
->
execute
(
$worker
->
analysis_id
,
$worker
->
dbID
);
$sth_update_analysis_id
->
finish
;
$self
->
update_analysis_id
(
$worker
);
# autoloaded
if
(
$special_batch
)
{
$worker
->
special_batch
(
$special_batch
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment