Commit 2d5ff61c authored by Leo Gordon's avatar Leo Gordon
Browse files

these four methods were neither used by Hive nor by Compara code

parent e02eef61
......@@ -69,18 +69,6 @@ sub update_status {
$self->status($status);
}
sub decrease_hive_capacity {
my ($self) = @_;
return unless ($self->adaptor);
$self->adaptor->decrease_hive_capacity($self->analysis_id);
}
sub increase_hive_capacity {
my ($self) = @_;
return unless ($self->adaptor);
$self->adaptor->increase_hive_capacity($self->analysis_id);
}
sub analysis_id {
my $self = shift;
$self->{'_analysis_id'} = shift if(@_);
......
......@@ -285,35 +285,6 @@ sub interval_update_work_done {
}
sub decrease_hive_capacity
{
my $self = shift;
my $analysis_id = shift;
my $sql = "UPDATE analysis_stats ".
" SET hive_capacity = hive_capacity - 1, ".
" num_required_workers = (CASE WHEN num_required_workers > 0 THEN num_required_workers - 1 ELSE 0 END) ".
" WHERE analysis_id='$analysis_id' and hive_capacity > 1";
$self->dbc->do($sql);
}
sub increase_hive_capacity
{
my $self = shift;
my $analysis_id = shift;
my $sql = "UPDATE analysis_stats ".
" SET hive_capacity = hive_capacity + 1, num_required_workers = 1".
" WHERE analysis_id='$analysis_id' and hive_capacity <= 500 and num_required_workers = 0";
$self->dbc->do($sql);
}
sub increase_running_workers
{
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