ensembl-hive  2.6
Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail:

Public Member Functions

public param_defaults ()
 
public fetch_input ()
 
public run ()
 
public write_output ()
 
public format_table ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::Process
public new ()
 
public life_cycle ()
 
public say_with_header ()
 
public enter_status ()
 
public warning ()
 
public param_defaults ()
 
public fetch_input ()
 
public run ()
 
public write_output ()
 
public Bio::EnsEMBL::Hive::Worker worker ()
 
public execute_writes ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBAdaptor db ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBConnection dbc ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBConnection data_dbc ()
 
public Returns run_system_command ()
 
public Bio::EnsEMBL::Hive::AnalysisJob input_job ()
 
public input_id ()
 
public param ()
 
public param_required ()
 
public param_exists ()
 
public param_is_defined ()
 
public param_substitute ()
 
public dataflow_output_id ()
 
public dataflow_output_ids_from_json ()
 
public throw ()
 
public This complete_early ()
 
public Int debug ()
 
public worker_temp_directory ()
 
public cleanup_worker_temp_directory ()
 

Detailed Description

Synopsis

This is a RunnableDB module that implements Bio::EnsEMBL::Hive::Process interface
and is ran by Workers during the execution of eHive pipelines.
It is not generally supposed to be instantiated and used outside of this framework.
Please refer to Bio::EnsEMBL::Hive::Process documentation to understand the basics of the RunnableDB interface.
Please refer to Bio::EnsEMBL::Hive::PipeConfig::* pipeline configuration files to understand how to configure pipelines.

Description

This RunnableDB module will send you a short notification email message per
each job.  You can either dataflow into it, or simply create standalone
jobs.

The main body of the email is expected in the "text" parameter. If the
"is_html" parameter is set, the body is expected to be in HTML.

Attachments such as diagrams, images, PDFs have to be listed in the
'attachments' parameter.

format_table provides a simple method to stringify a table of data. If
you need more options to control the separators, the alignment, etc, have a
look at the very comprehensive Text::Table.

Note: this module uses Email::Sender to send the email, which by default
uses sendmail but has other backends configured. As such, it depends
heavily on the implementation of your compute farm. Please make sure it
works as intended before using this module in complex pipelines.

Definition at line 40 of file NotifyByEmail.pm.

Member Function Documentation

◆ fetch_input()

public Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::fetch_input ( )
    Description : Implements fetch_input() interface method of Bio::EnsEMBL::Hive::Process that is used to read in parameters and load data.
                  Here we have nothing to do.
 
Code:
click to view

◆ format_table()

public Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::format_table ( )
The same type of table could be generated with Text::Table:
  my $first_column_name = shift $columns;
  my $tb = Text::Table->new(\'| ', $first_column_name, (map { +(\' | ', $_) } $columns), \' |',);
  $tb->load($results);
  my $rule = $tb->rule('-', '+');
  return $title . "\n" . $rule . $tb->title() . $rule .  $tb->body() . $rule;
 
Code:
click to view

◆ param_defaults()

public Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::param_defaults ( )

Undocumented method

Code:
click to view

◆ run()

public Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::run ( )
    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).
                  Here the actual sending of the email message happens in run() though one may argue it is technically 'output'.
    param('email'):   The email address to send the message to.
    param('subject'): The (optional) 'Subject:' line.
    param('text'):    Text of the email message. It will undergo parameter substitution.
    param('is_html'): Boolean. Whether the content of 'text' is in HTML
    param('attachments'): Array of paths for files to attach.
    param('*'):       Any other parameters can be freely used for parameter substitution.
 
Code:
click to view

◆ write_output()

public Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::write_output ( )
    Description : Implements write_output() interface method of Bio::EnsEMBL::Hive::Process that is used to deal with job's output after the execution.
                  Here we have nothing to do.
 
Code:
click to view

The documentation for this class was generated from the following file:
map
public map()
Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::write_output
public write_output()
Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::format_table
public format_table()
Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::param_defaults
public param_defaults()
Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::run
public run()
Bio::EnsEMBL::Hive::Process
Definition: Process.pm:77
Bio::EnsEMBL::Hive::PipeConfig
Definition: EnsemblGeneric_conf.pm:5
Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail::fetch_input
public fetch_input()