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
1e9b17ca
Commit
1e9b17ca
authored
Feb 16, 2005
by
Jessica Severin
Browse files
changed synchronize_AnalysisStats so that it always checks for the 5minute delay
so to reduce the sychronization frequency.
parent
cf7fbd73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+6
-7
No files found.
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
1e9b17ca
...
...
@@ -174,7 +174,7 @@ sub register_worker_death {
$self
->
db
->
get_AnalysisJobAdaptor
->
reset_dead_jobs_for_worker
(
$worker
);
}
#
always
re-sync the analysis_stats when a worker dies
# re-sync the analysis_stats when a worker dies
$self
->
synchronize_AnalysisStats
(
$worker
->
analysis
->
stats
);
}
...
...
@@ -191,12 +191,7 @@ sub worker_check_in {
$sth
->
execute
();
$sth
->
finish
;
# if analysis_stats for this worker's analysis is more than a minutes
# out of date, then re-synchronize it
my
$stats
=
$worker
->
analysis
->
stats
;
if
(
$stats
->
seconds_since_last_update
>=
60
)
{
$self
->
synchronize_AnalysisStats
(
$stats
);
}
$self
->
synchronize_AnalysisStats
(
$worker
->
analysis
->
stats
);
}
...
...
@@ -260,6 +255,7 @@ sub synchronize_AnalysisStats {
return
$analysisStats
unless
(
$analysisStats
);
return
$analysisStats
unless
(
$analysisStats
->
analysis_id
);
return
$analysisStats
if
(
$analysisStats
->
seconds_since_last_update
<
5
*
60
);
return
$analysisStats
if
(
$analysisStats
->
status
eq
'
SYNCHING
');
$analysisStats
->
update_status
('
SYNCHING
');
...
...
@@ -491,6 +487,7 @@ sub print_running_worker_status
{
my
$self
=
shift
;
my
$total
=
0
;
print
("
HIVE LIVE WORKERS====
\n
");
my
$sql
=
"
select logic_name, count(*) from hive, analysis
"
.
"
where hive.analysis_id=analysis.analysis_id and hive.cause_of_death=''
"
.
...
...
@@ -499,7 +496,9 @@ sub print_running_worker_status
$sth
->
execute
();
while
((
my
$logic_name
,
my
$count
)
=
$sth
->
fetchrow_array
())
{
printf
("
%20s : %d workers
\n
",
$logic_name
,
$count
);
$total
+=
$count
;
}
printf
("
%d total workers
\n
",
$total
);
print
("
=====================
\n
");
$sth
->
finish
;
}
...
...
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