13 Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
14 Copyright [2016-2024] EMBL-European Bioinformatics Institute
16 Licensed under the Apache License,
Version 2.0 (the
"License"); you may not use
this file except in compliance with the License.
17 You may obtain a copy of the License at
21 Unless required by applicable law or agreed to in writing, software distributed under the License
22 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 See the License
for the specific language governing permissions and limitations under the License.
27 Please subscribe to the
Hive mailing list: http:
31 The rest of the documentation details each of the
object methods.
32 Internal methods are usually preceded with a _
37 package Bio::EnsEMBL::Hive::Role;
42 use base (
'Bio::EnsEMBL::Hive::Storable' );
48 analysis_id / analysis
55 $self->{
'_when_started'} = shift
if(@_);
56 return $self->{
'_when_started'};
62 $self->{
'_when_finished'} = shift
if(@_);
63 return $self->{
'_when_finished'};
69 $self->{
'_attempted_jobs'} = shift
if(@_);
70 return $self->{
'_attempted_jobs'} || 0;
76 $self->{
'_done_jobs'} = shift
if(@_);
77 return $self->{
'_done_jobs'} || 0;
81 sub register_attempt {
85 $self->{
'_attempted_jobs'}++;
86 $self->{
'_done_jobs'} += $success;
88 if( my $adaptor = $self->adaptor ) {
89 $adaptor->update_attempted_jobs_AND_done_jobs( $self );