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
743d8d55
Commit
743d8d55
authored
10 years ago
by
Leo Gordon
Browse files
Options
Downloads
Patches
Plain Diff
API change : AJA::fetch_all_by_analysis_id_status now takes an optional $list_of_analyses argument
parent
c250fa3c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
+12
-4
12 additions, 4 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
scripts/beekeeper.pl
+1
-1
1 addition, 1 deletion
scripts/beekeeper.pl
with
13 additions
and
5 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
+
12
−
4
View file @
743d8d55
...
@@ -138,21 +138,29 @@ sub store_jobs_and_adjust_counters {
...
@@ -138,21 +138,29 @@ sub store_jobs_and_adjust_counters {
=head2 fetch_all_by_analysis_id_status
=head2 fetch_all_by_analysis_id_status
Arg [1] : (optional)
int $
analys
is_id
Arg [1] : (optional)
listref $list_of_
analys
es
Arg [2] : (optional) string $status
Arg [2] : (optional) string $status
Arg [3] : (optional) int $retry_at_least
Arg [3] : (optional) int $retry_at_least
Example : $all_failed_jobs = $adaptor->fetch_all_by_analysis_id_status(undef, 'FAILED');
Example : $all_failed_jobs = $adaptor->fetch_all_by_analysis_id_status(undef, 'FAILED');
$analysis_done_jobs = $adaptor->fetch_all_by_analysis_id_status(
$analysis->dbID
, 'DONE');
$analysis_done_jobs = $adaptor->fetch_all_by_analysis_id_status(
$list_of_analyses
, 'DONE');
Description: Returns a list of all jobs filtered by given analysis_id (if specified) and given status (if specified).
Description: Returns a list of all jobs filtered by given analysis_id (if specified) and given status (if specified).
Returntype : reference to list of Bio::EnsEMBL::Hive::AnalysisJob objects
Returntype : reference to list of Bio::EnsEMBL::Hive::AnalysisJob objects
=cut
=cut
sub
fetch_all_by_analysis_id_status
{
sub
fetch_all_by_analysis_id_status
{
my
(
$self
,
$analys
is_id
,
$status
,
$retry_count_at_least
)
=
@_
;
my
(
$self
,
$
list_of_
analys
es
,
$status
,
$retry_count_at_least
)
=
@_
;
my
@constraints
=
();
my
@constraints
=
();
push
@constraints
,
"
analysis_id=
$analysis_id
"
if
(
$analysis_id
);
if
(
$list_of_analyses
)
{
if
(
ref
(
$list_of_analyses
)
eq
'
ARRAY
')
{
push
@constraints
,
"
analysis_id IN (
"
.
(
join
('
,
',
map
{
$_
->
dbID
}
@$list_of_analyses
))
.
"
)
";
}
else
{
push
@constraints
,
"
analysis_id=
$list_of_analyses
";
# for compatibility with old interface
}
}
push
@constraints
,
"
status='
$status
'
"
if
(
$status
);
push
@constraints
,
"
status='
$status
'
"
if
(
$status
);
push
@constraints
,
"
retry_count >=
$retry_count_at_least
"
if
(
$retry_count_at_least
);
push
@constraints
,
"
retry_count >=
$retry_count_at_least
"
if
(
$retry_count_at_least
);
...
...
This diff is collapsed.
Click to expand it.
scripts/beekeeper.pl
+
1
−
1
View file @
743d8d55
...
@@ -275,7 +275,7 @@ sub main {
...
@@ -275,7 +275,7 @@ sub main {
if
(
$show_failed_jobs
)
{
if
(
$show_failed_jobs
)
{
print
("
===== failed jobs
\n
");
print
("
===== failed jobs
\n
");
my
$failed_job_list
=
$self
->
{'
dba
'}
->
get_AnalysisJobAdaptor
->
fetch_all_by_analysis_id_status
(
$analysis
&&
$analysis
->
dbID
,
'
FAILED
');
my
$failed_job_list
=
$self
->
{'
dba
'}
->
get_AnalysisJobAdaptor
->
fetch_all_by_analysis_id_status
(
$self
->
{'
logic_name
'}
and
$list_of_analyses
,
'
FAILED
');
foreach
my
$job
(
@
{
$failed_job_list
})
{
foreach
my
$job
(
@
{
$failed_job_list
})
{
print
$job
->
toString
.
"
\n
";
print
$job
->
toString
.
"
\n
";
...
...
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