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
f2186a27
Commit
f2186a27
authored
15 years ago
by
Albert Vilella
Browse files
Options
Downloads
Patches
Plain Diff
call differently when maximise_concurrency is 1
parent
dc4ec348
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
+14
-3
14 additions, 3 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
with
14 additions
and
3 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
+
14
−
3
View file @
f2186a27
...
...
@@ -45,6 +45,7 @@ our @ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor);
=head2 fetch_by_analysis_id
Arg [1] : int $id
the unique database identifier for the feature to be obtained
Example : $feat = $adaptor->fetch_by_analysis_id(1234);
...
...
@@ -53,6 +54,7 @@ our @ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor);
Returntype : Bio::EnsEMBL::Hive::AnalysisStats
Exceptions : thrown if $id is not defined
Caller : general
=cut
sub
fetch_by_analysis_id
{
...
...
@@ -88,11 +90,20 @@ sub fetch_all {
sub
fetch_by_needed_workers
{
my
$self
=
shift
;
my
$limit
=
shift
;
my
$maximise_concurrency
=
shift
;
my
$constraint
=
"
ast.num_required_workers>0 AND ast.status in ('READY','WORKING')
";
my
$first_order_by
;
if
(
$maximise_concurrency
)
{
$first_order_by
=
'
ORDER BY num_running_workers
';
# print STDERR "###> Maximising concurrency\n";
}
else
{
$first_order_by
=
'
ORDER BY num_required_workers DESC
';
}
if
(
$limit
)
{
$self
->
_final_clause
("
ORDER BY num_required_w
or
k
er
s DESC
, hive_capacity DESC, analysis_id LIMIT
$limit
");
$self
->
_final_clause
("
$first_
or
d
er
_by
, hive_capacity DESC, analysis_id LIMIT
$limit
");
}
else
{
$self
->
_final_clause
("
ORDER BY num_required_w
or
k
er
s DESC
, hive_capacity DESC, analysis_id
");
$self
->
_final_clause
("
$first_
or
d
er
_by
, hive_capacity DESC, analysis_id
");
}
my
$results
=
$self
->
_generic_fetch
(
$constraint
);
$self
->
_final_clause
("");
#reset final clause for other fetches
...
...
@@ -159,7 +170,7 @@ sub get_running_worker_count {
Returntype : Bio::EnsEMBL::Hive::Worker
Exceptions :
Caller :
=cut
sub
update
{
...
...
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