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
800f19d5
Commit
800f19d5
authored
12 years ago
by
Leo Gordon
Browse files
Options
Downloads
Patches
Plain Diff
substituted fetch_all_failed_jobs() by a more versatile fetch_all_by_analysis_id_status()
parent
fd223969
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+13
-12
13 additions, 12 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
scripts/beekeeper.pl
+1
-1
1 addition, 1 deletion
scripts/beekeeper.pl
with
14 additions
and
13 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
+
13
−
12
View file @
800f19d5
...
...
@@ -185,25 +185,26 @@ sub fetch_by_dbID {
}
=head2 fetch_all_
failed_job
s
=head2 fetch_all_
by_analysis_id_statu
s
Arg [1] : (optional) int $analysis_id
Example : $failed_jobs = $adaptor->fetch_all_failed_jobs;
$failed_jobs = $adaptor->fetch_all_failed_jobs($analysis->dbID);
Description: Returns a list of all jobs with status 'FAILED'. If an $analysis_id
is specified it will limit the search accordingly.
Arg [2] : (optional) string $status
Arg [3] : (optional) int $retry_at_least
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');
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
Exceptions : none
Caller : user processes
=cut
sub
fetch_all_
failed_job
s
{
my
(
$self
,
$analysis_id
)
=
@_
;
sub
fetch_all_
by_analysis_id_statu
s
{
my
(
$self
,
$analysis_id
,
$status
,
$retry_count_at_least
)
=
@_
;
my
$constraint
=
"
j.status='FAILED'
";
$constraint
.=
"
AND j.analysis_id=
$analysis_id
"
if
(
$analysis_id
);
return
$self
->
_generic_fetch
(
$constraint
);
my
@constraints
=
();
push
@constraints
,
"
j.analysis_id=
$analysis_id
"
if
(
$analysis_id
);
push
@constraints
,
"
j.status='
$status
'
"
if
(
$status
);
push
@constraints
,
"
j.retry_count >=
$retry_count_at_least
"
if
(
$retry_count_at_least
);
return
$self
->
_generic_fetch
(
join
"
AND
",
@constraints
);
}
...
...
This diff is collapsed.
Click to expand it.
scripts/beekeeper.pl
+
1
−
1
View file @
800f19d5
...
...
@@ -260,7 +260,7 @@ sub main {
if
(
$show_failed_jobs
)
{
print
("
===== failed jobs
\n
");
my
$failed_job_list
=
$self
->
{'
dba
'}
->
get_AnalysisJobAdaptor
->
fetch_all_
failed_jobs
(
);
my
$failed_job_list
=
$self
->
{'
dba
'}
->
get_AnalysisJobAdaptor
->
fetch_all_
by_analysis_id_status
(
$analysis
&&
$analysis
->
dbID
,
'
FAILED
'
);
foreach
my
$job
(
@
{
$failed_job_list
})
{
$job
->
print_job
();
...
...
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