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
4ad12163
Commit
4ad12163
authored
18 years ago
by
Javier Herrero
Browse files
Options
Downloads
Patches
Plain Diff
Change: create a global variable instead of a "magic number" for the maximum number of retries
parent
8400da56
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/AnalysisJobAdaptor.pm
+8
-5
8 additions, 5 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
with
8 additions
and
5 deletions
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
+
8
−
5
View file @
4ad12163
...
...
@@ -52,6 +52,8 @@ use Bio::EnsEMBL::Utils::Exception;
our
@ISA
=
qw(Bio::EnsEMBL::DBSQL::BaseAdaptor)
;
our
$max_retry_count
=
7
;
###############################################################################
#
# CLASS methods
...
...
@@ -499,7 +501,8 @@ sub claim_jobs_for_worker {
Jobs in state CLAIMED as simply reset back to READY.
If jobs was in a 'working' state (GET_INPUT, RUN, WRITE_OUTPUT))
the retry_count is incremented and the status set back to READY.
If the retry_count >=7 the job is set to 'FAILED' and not rerun again.
If the retry_count >= $max_retry_count (7) the job is set to 'FAILED'
and not rerun again.
Exceptions : $worker must be defined
Caller : Bio::EnsEMBL::Hive::Queen
...
...
@@ -528,7 +531,7 @@ sub reset_dead_jobs_for_worker {
$sql
=
"
UPDATE analysis_job SET job_claim='', status='READY'
"
.
"
,retry_count=retry_count+1
"
.
"
WHERE status in ('GET_INPUT','RUN','WRITE_OUTPUT')
"
.
"
AND retry_count<
7
"
.
"
AND retry_count<
$max_retry_count
"
.
"
AND hive_id='
"
.
$worker
->
hive_id
.
"
'
";
#print("$sql\n");
$sth
=
$self
->
prepare
(
$sql
);
...
...
@@ -538,7 +541,7 @@ sub reset_dead_jobs_for_worker {
$sql
=
"
UPDATE analysis_job SET status='FAILED'
"
.
"
,retry_count=retry_count+1
"
.
"
WHERE status in ('GET_INPUT','RUN','WRITE_OUTPUT')
"
.
"
AND retry_count>=
7
"
.
"
AND retry_count>=
$max_retry_count
"
.
"
AND hive_id='
"
.
$worker
->
hive_id
.
"
'
";
#print("$sql\n");
$sth
=
$self
->
prepare
(
$sql
);
...
...
@@ -569,7 +572,7 @@ sub reset_dead_job_by_dbID {
$sql
=
"
UPDATE analysis_job SET job_claim='', status='READY'
"
.
"
,retry_count=retry_count+1
"
.
"
WHERE status in ('GET_INPUT','RUN','WRITE_OUTPUT')
"
.
"
AND retry_count<
7
"
.
"
AND retry_count<
$max_retry_count
"
.
"
AND analysis_job_id=
$job_id
";
#print("$sql\n");
$self
->
dbc
->
do
(
$sql
);
...
...
@@ -577,7 +580,7 @@ sub reset_dead_job_by_dbID {
$sql
=
"
UPDATE analysis_job SET status='FAILED'
"
.
"
,retry_count=retry_count+1
"
.
"
WHERE status in ('GET_INPUT','RUN','WRITE_OUTPUT')
"
.
"
AND retry_count>=
7
"
.
"
AND retry_count>=
$max_retry_count
"
.
"
AND analysis_job_id=
$job_id
";
#print("$sql\n");
$self
->
dbc
->
do
(
$sql
);
...
...
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