Commit 9e9838cd authored by Jessica Severin's avatar Jessica Severin
Browse files

added Queen::get_hive_progress which return a whole hive 'done jobs' and

'total jobs' count so one can calculate a 'progress bar'
parent 045a9d7a
...@@ -449,6 +449,18 @@ sub get_num_needed_workers { ...@@ -449,6 +449,18 @@ sub get_num_needed_workers {
} }
sub get_hive_progress
{
my $self = shift;
my $sql = "SELECT sum(done_job_count ), sum(total_job_count) FROM analysis_stats";
my $sth = $self->prepare($sql);
$sth->execute();
my ($done, $total) = $sth->fetchrow_array();
$sth->finish;
printf("hive %1.2f%% complete (%d done / %d total)\n", ($done/$total * 100), $done, $total);
return $done, $total;
}
sub print_hive_status sub print_hive_status
{ {
my $self = shift; my $self = shift;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment