Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
90513b84
Commit
90513b84
authored
May 14, 2014
by
Leo Gordon
Browse files
moved Q:get_workers_rank --> RA:get_role_rank
parent
fef64ef9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
modules/Bio/EnsEMBL/Hive/DBSQL/RoleAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/RoleAdaptor.pm
+8
-1
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+0
-7
modules/Bio/EnsEMBL/Hive/Worker.pm
modules/Bio/EnsEMBL/Hive/Worker.pm
+5
-4
No files found.
modules/Bio/EnsEMBL/Hive/DBSQL/RoleAdaptor.pm
View file @
90513b84
...
...
@@ -95,10 +95,17 @@ sub get_hive_current_load {
}
sub
get_role_rank
{
my
(
$self
,
$role
)
=
@_
;
return
$self
->
count_all
(
'
analysis_id=
'
.
$role
->
analysis_id
.
'
AND when_finished IS NULL AND role_id<
'
.
$role
->
dbID
);
}
sub
count_active_roles
{
my
(
$self
,
$analysis_id
)
=
@_
;
return
$self
->
count_all
(
"
when_finished IS NULL
"
.
(
$analysis_id
?
"
AND
analysis_id=
$analysis_id
"
:
'')
);
return
$self
->
count_all
(
(
$analysis_id
?
"
analysis_id=
$analysis_id
AND
"
:
'')
.
'
when_finished IS NULL
'
);
}
...
...
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
90513b84
...
...
@@ -667,13 +667,6 @@ sub get_num_failed_analyses {
}
sub
get_workers_rank
{
my
(
$self
,
$worker
)
=
@_
;
return
$self
->
count_all
(
"
status!='DEAD' AND analysis_id=
"
.
$worker
->
current_role
->
analysis_id
.
"
AND worker_id<
"
.
$worker
->
dbID
);
}
sub
get_remaining_jobs_show_hive_progress
{
my
$self
=
shift
;
my
$sql
=
"
SELECT sum(done_job_count), sum(failed_job_count), sum(total_job_count),
"
.
...
...
modules/Bio/EnsEMBL/Hive/Worker.pm
View file @
90513b84
...
...
@@ -509,11 +509,12 @@ sub run {
$self
->
cause_of_death
('
LIFESPAN
');
}
else
{
my
$desired_batch_size
=
$self
->
current_role
->
analysis
->
stats
->
get_or_estimate_batch_size
();
$desired_batch_size
=
$self
->
job_limiter
->
preliminary_offer
(
$desired_batch_size
);
my
$current_role
=
$self
->
current_role
;
my
$desired_batch_size
=
$current_role
->
analysis
->
stats
->
get_or_estimate_batch_size
();
$desired_batch_size
=
$self
->
job_limiter
->
preliminary_offer
(
$desired_batch_size
);
my
$
workers
_rank
=
$self
->
adaptor
->
get_workers_rank
(
$self
);
my
$actual_batch
=
$job_adaptor
->
grab_jobs_for_worker
(
$self
,
$desired_batch_size
,
$
workers
_rank
);
my
$
role
_rank
=
$self
->
adaptor
->
db
->
get_RoleAdaptor
->
get_role_rank
(
$current_role
);
my
$actual_batch
=
$job_adaptor
->
grab_jobs_for_worker
(
$self
,
$desired_batch_size
,
$
role
_rank
);
if
(
scalar
(
@$actual_batch
))
{
my
$jobs_done_by_this_batch
=
$self
->
run_one_batch
(
$actual_batch
);
$jobs_done_by_batches_loop
+=
$jobs_done_by_this_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