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
d72e9cf8
Commit
d72e9cf8
authored
Jul 14, 2004
by
Jessica Severin
Browse files
added -process_id option to Queen:create_new_worker method to allow external
setting (e.g. lsf job_id and array_index
parent
8db874e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+5
-5
No files found.
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
d72e9cf8
...
...
@@ -88,8 +88,8 @@ our @ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor);
sub
create_new_worker
{
my
(
$self
,
@args
)
=
@_
;
my
(
$analysis_id
,
$beekeeper
)
=
rearrange
([
qw(analysis_id beekeeper
)
],
@args
);
my
(
$analysis_id
,
$beekeeper
,
$pid
)
=
rearrange
([
qw(analysis_id beekeeper
process_id)
],
@args
);
my
$analStatsDBA
=
$self
->
db
->
get_AnalysisStatsAdaptor
;
return
undef
unless
(
$analStatsDBA
);
...
...
@@ -115,11 +115,11 @@ sub create_new_worker {
}
my
$host
=
hostname
;
my
$p
pid
=
getppid
;
$
pid
=
getppid
unless
(
$pid
)
;
$beekeeper
=
''
unless
(
$beekeeper
);
my
$sql
=
"
INSERT INTO hive SET born=now(), last_check_in=now()
"
.
"
,process_id='
$
p
pid
'
"
.
"
,process_id='
$pid
'
"
.
"
,analysis_id='
$analysis_id
'
"
.
"
,beekeeper='
$beekeeper
'
"
.
"
,host='
$host
'
";
...
...
@@ -313,7 +313,7 @@ sub get_num_needed_workers {
last
if
(
$availableLoad
<=
0.0
);
}
print
("
need
$numWorkers
workers (
$
avail
ableLoad
load left)
\n
"
);
print
f
("
need
$numWorkers
workers (avail
Load=%1.5f)
\n
",
$availableLoad
);
return
$numWorkers
;
}
...
...
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