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
c3985a7f
Commit
c3985a7f
authored
Jun 14, 2004
by
Jessica Severin
Browse files
fixed bug in last_update value
added method fetch_by_needed_workers for queen to determine new worker types
parent
555e1049
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
+8
-17
No files found.
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
View file @
c3985a7f
...
...
@@ -91,6 +91,12 @@ sub fetch_all {
}
sub
fetch_by_needed_workers
{
my
$self
=
shift
;
my
$constraint
=
"
ast.num_required_workers>0 AND ast.status in ('READY','WORKING')
";
return
$self
->
_generic_fetch
(
$constraint
);
}
#
# INTERNAL METHODS
...
...
@@ -173,22 +179,7 @@ sub _tables {
sub
_columns
{
my
$self
=
shift
;
=head3
CREATE TABLE analysis_stats (
analysis_id int(10) NOT NULL,
status enum('BLOCKED', 'READY', 'WORKING', 'ALL_CLAIMED', 'DONE')
DEFAULT 'READY' NOT NULL,
batch_size int(10) NOT NULL,
hive_capacity int(10) NOT NULL,
total_job_count int(10) NOT NULL,
unclaimed_job_count int(10) NOT NULL,
done_job_count int(10) NOT NULL,
num_required_workers int(10) NOT NULL,
last_update datetime NOT NULL,
UNIQUE KEY (analysis_id)
);
=cut
my
@columns
=
qw (ast.analysis_id
ast
.
status
ast
.
batch_size
...
...
@@ -199,7 +190,7 @@ CREATE TABLE analysis_stats (
ast
.
num_required_workers
ast
.
last_update
);
push
@columns
,
"
NOW()-
ast.last_update seconds_since_last_update
";
push
@columns
,
"
UNIX_TIMESTAMP()-UNIX_TIMESTAMP(
ast.last_update
)
seconds_since_last_update
";
return
@columns
;
}
...
...
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