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
d4f60be9
Commit
d4f60be9
authored
Nov 07, 2013
by
Leo Gordon
Browse files
started using Analysis::jobs_collection for pre-loading jobs to be displayed
parent
b962f38c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
+9
-2
No files found.
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
View file @
d4f60be9
...
...
@@ -165,6 +165,14 @@ sub build {
my
$all_control_rules_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$self
->
dba
()
->
get_AnalysisCtrlRuleAdaptor
()
->
fetch_all
);
my
$all_dataflow_rules_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$self
->
dba
()
->
get_DataflowRuleAdaptor
()
->
fetch_all
);
if
(
my
$job_limit
=
$self
->
config_get
('
DisplayJobs
')
)
{
my
$job_adaptor
=
$self
->
dba
->
get_AnalysisJobAdaptor
();
foreach
my
$analysis
(
$all_analyses_coll
->
list
)
{
my
@jobs
=
sort
{
$a
->
dbID
<=>
$b
->
dbID
}
@
{
$job_adaptor
->
fetch_some_by_analysis_id_limit
(
$analysis
->
dbID
,
$job_limit
+
1
)};
$analysis
->
jobs_collection
(
\
@jobs
);
}
}
foreach
my
$c_rule
(
$all_control_rules_coll
->
list
)
{
my
$ctrled_analysis
=
$all_analyses_coll
->
find_one_by
('
dbID
',
$c_rule
->
ctrled_analysis_id
);
$c_rule
->
ctrled_analysis
(
$ctrled_analysis
);
...
...
@@ -370,8 +378,7 @@ sub _add_analysis_node {
}
if
(
my
$job_limit
=
$self
->
config_get
('
DisplayJobs
')
)
{
my
$adaptor
=
$self
->
dba
->
get_AnalysisJobAdaptor
();
my
@jobs
=
sort
{
$a
->
dbID
<=>
$b
->
dbID
}
@
{
$adaptor
->
fetch_some_by_analysis_id_limit
(
$analysis
->
dbID
,
$job_limit
+
1
)};
my
@jobs
=
@
{
$analysis
->
jobs_collection
};
my
$hit_limit
;
if
(
scalar
(
@jobs
)
>
$job_limit
)
{
...
...
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