Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
aadc55d3
Commit
aadc55d3
authored
Jun 13, 2005
by
Jessica Severin
Browse files
changed behaviour so that claiming of jobs preferentially picks jobs that
have not been run before (< retry_count)
parent
bcacb2a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
+17
-12
No files found.
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
View file @
aadc55d3
...
...
@@ -450,18 +450,23 @@ sub claim_jobs_for_worker {
my
$claim
=
$ug
->
to_string
(
$uuid
);
#print("claiming jobs for hive_id=", $worker->hive_id, " with uuid $claim\n");
my
$sql
=
"
UPDATE analysis_job SET job_claim='
$claim
'
"
.
"
, hive_id='
"
.
$worker
->
hive_id
.
"
'
"
.
"
, status='CLAIMED'
"
.
"
WHERE job_claim='' and status='READY'
"
.
"
AND analysis_id='
"
.
$worker
->
analysis
->
dbID
.
"
'
"
.
"
LIMIT
"
.
$worker
->
batch_size
;
#print("$sql\n");
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
();
$sth
->
finish
;
my
$sql_base
=
"
UPDATE analysis_job SET job_claim='
$claim
'
"
.
"
, hive_id='
"
.
$worker
->
hive_id
.
"
'
"
.
"
, status='CLAIMED'
"
.
"
WHERE job_claim='' and status='READY'
"
.
"
AND analysis_id='
"
.
$worker
->
analysis
->
dbID
.
"
'
";
my
$sql_virgin
=
$sql_base
.
"
AND retry_count=0
"
.
"
LIMIT
"
.
$worker
->
batch_size
;
my
$sql_any
=
$sql_base
.
"
LIMIT
"
.
$worker
->
batch_size
;
my
$claim_count
=
$self
->
dbc
->
do
(
$sql_virgin
);
if
(
$claim_count
==
0
)
{
$claim_count
=
$self
->
dbc
->
do
(
$sql_any
);
}
return
$claim
;
}
...
...
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