← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:07 2021

Filename/usr/local/libexec/sympa/Sympa/Spindle/ProcessTemplate.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sSympa::Spindle::ProcessTemplate::::BEGIN@27Sympa::Spindle::ProcessTemplate::BEGIN@27
0000s0sSympa::Spindle::ProcessTemplate::::BEGIN@28Sympa::Spindle::ProcessTemplate::BEGIN@28
0000s0sSympa::Spindle::ProcessTemplate::::BEGIN@30Sympa::Spindle::ProcessTemplate::BEGIN@30
0000s0sSympa::Spindle::ProcessTemplate::::BEGIN@32Sympa::Spindle::ProcessTemplate::BEGIN@32
0000s0sSympa::Spindle::ProcessTemplate::::BEGIN@36Sympa::Spindle::ProcessTemplate::BEGIN@36
0000s0sSympa::Spindle::ProcessTemplate::::BEGIN@42Sympa::Spindle::ProcessTemplate::BEGIN@42
0000s0sSympa::Spindle::ProcessTemplate::::BEGIN@43Sympa::Spindle::ProcessTemplate::BEGIN@43
0000s0sSympa::Spindle::ProcessTemplate::::__ANON__Sympa::Spindle::ProcessTemplate::__ANON__ (xsub)
0000s0sSympa::Spindle::ProcessTemplate::::_on_failureSympa::Spindle::ProcessTemplate::_on_failure
0000s0sSympa::Spindle::ProcessTemplate::::_on_successSympa::Spindle::ProcessTemplate::_on_success
0000s0sSympa::Spindle::ProcessTemplate::::_twistSympa::Spindle::ProcessTemplate::_twist
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# -*- indent-tabs-mode: nil; -*-
2# vim:ft=perl:et:sw=4
3# $Id$
4
5# Sympa - SYsteme de Multi-Postage Automatique
6#
7# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
8# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
9# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
10# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
11#
12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
25package Sympa::Spindle::ProcessTemplate;
26
27use strict;
28use warnings;
29
30use Sympa::Log;
31
32use base qw(Sympa::Spindle);
33
34my $log = Sympa::Log->instance;
35
36use constant _distaff => 'Sympa::Message::Template';
37
38sub _on_failure {
39 shift->{finish} = 'failure';
40}
41
42use constant _on_garbage => 1;
43use constant _on_skip => 1;
44
45sub _on_success {
46 shift->{finish} = 'success';
47}
48
49sub _twist {
50 my $self = shift;
51 my $message = shift;
52
53 $log->syslog(
54 'notice',
55 'Processing %s; envelope_sender=%s; message_id=%s; recipients=%s; sender=%s; template=%s; %s',
56 $message,
57 $message->{envelope_sender},
58 $message->{message_id},
59 $self->{rcpt},
60 $message->{sender},
61 $self->{template},
62 join('; ',
63 map { $self->{data}->{$_} ? ("$_=$self->{data}->{$_}") : () }
64 qw(type action reason status))
65 );
66
67 $message->{rcpt} = $self->{rcpt};
68
69 return $self->{splicing_to} || ['Sympa::Spindle::ToOutgoing'];
70}
71
721;
73__END__