17 A job of
'Bio::EnsEMBL::Hive::RunnableDB::Dummy' analysis does not
do any work by itself,
18 but it benefits from the side-effects that are associated with having an analysis.
20 For example,
if a dataflow rule is linked to the analysis then
21 every job that is created or flown into
this analysis will be dataflown further according to
this rule.
23 param(
'take_time'): How much time to spend sleeping (floating point seconds);
24 can be given by a runtime-evaluated formula; useful
for testing.
28 Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
29 Copyright [2016-2024] EMBL-European Bioinformatics Institute
31 Licensed under the Apache License,
Version 2.0 (the
"License"); you may not use
this file except in compliance with the License.
32 You may obtain a copy of the License at
36 Unless required by applicable law or agreed to in writing, software distributed under the License
37 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38 See the License
for the specific language governing permissions and limitations under the License.
42 Please subscribe to the
Hive mailing list: http:
47 package Bio::EnsEMBL::Hive::RunnableDB::Dummy;
51 use Time::HiRes (
'usleep');
53 use base (
'Bio::EnsEMBL::Hive::Process');
58 Description : Implements param_defaults()
interface method of
Bio::EnsEMBL::Hive::Process that defines module defaults for parameters.
65 'take_time' => 0, # how much time
run() method will spend in sleeping state
72 Description : Implements fetch_input()
interface method of
Bio::EnsEMBL::Hive::Process that is used to read in parameters and load data.
73 Here we simply override this method so that nothing is done.
82 Description : Implements
run()
interface method of
Bio::EnsEMBL::Hive::Process that is used to perform the
main bulk of the job (minus input and output).
83 Since this Runnable is a
Dummy, it does nothing. But it can also optionally sleep for param('take_time') seconds.
90 my $take_time = eval $self->param(
'take_time');
92 $self->say_with_header(
"Sleeping for '$take_time' seconds...");
93 usleep( $take_time*1000000 );
94 $self->say_with_header(
"Done.");
100 Description : Implements write_output()
interface method of
Bio::EnsEMBL::Hive::Process that is used to deal with job's output after the execution.
101 Here we simply override this method so that nothing is done.