Please, stop!
I'm not finished merging yet!
Bulk.pm and all the Sympa daemons are still using the old spool
code. By adapting the code now, you're likely to add conflicts...
Hopefully, you adapted the code on places that would have had
conflicts anyway, but any refactoring you do on files that are
still listed in merge_conflicts will trigger new conflicts - and
your code can be broken duriong the merge.
Hope I'm not being rude here, but please let me finish the merge
BEFORE you do any more refactoring.
Cheers,
David
sympa[9588] branches/sympa-cleanup/src: [dev] enforce usage
of SQL spools so long as we don't have proper configuration
switch to select implementation
- Revision
- 9588
- Author
- rousse
- Date
- 2013-07-22 14:14:51 +0200 (lun. 22 juil. 2013)
Log Message
[dev] enforce usage of SQL spools so long as we don't have proper configuration switch to select implementation
Modified Paths
- branches/sympa-cleanup/src/lib/Sympa/Bulk.pm
- branches/sympa-cleanup/src/lib/Sympa/Commands.pm
- branches/sympa-cleanup/src/lib/Sympa/List.pm
- branches/sympa-cleanup/src/lib/Sympa/Upgrade.pm
- branches/sympa-cleanup/src/sbin/archived.pl.in
- branches/sympa-cleanup/src/sbin/bounced.pl.in
- branches/sympa-cleanup/src/sbin/bulk.pl.in
- branches/sympa-cleanup/src/sbin/spooler.pl.in
- branches/sympa-cleanup/src/sbin/sympa.pl.in
- branches/sympa-cleanup/src/sbin/task_manager.pl.in
Diff
Modified: branches/sympa-cleanup/src/lib/Sympa/Bulk.pm
(9587 => 9588)
--- branches/sympa-cleanup/src/lib/Sympa/Bulk.pm 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/lib/Sympa/Bulk.pm 2013-07-22 12:14:51 UTC (rev 9588)
@@ -51,7 +51,7 @@
use Sympa::List;
use Sympa::Log::Syslog;
use Sympa::Log::Database;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Template;
use Sympa::Tools;
@@ -531,7 +531,7 @@
# because as soon as packet are created bulk.pl may distribute them
my $message_already_on_spool;
- my $bulkspool = Sympa::Spool->new(
+ my $bulkspool = Sympa::Spool::SQL->new(
name => 'bulk',
base => $self->{base}
);
Modified: branches/sympa-cleanup/src/lib/Sympa/Commands.pm
(9587 => 9588)
--- branches/sympa-cleanup/src/lib/Sympa/Commands.pm 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/lib/Sympa/Commands.pm 2013-07-22 12:14:51 UTC (rev 9588)
@@ -46,7 +46,7 @@
use Sympa::Message;
use Sympa::Report;
use Sympa::Scenario;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::File;
use Sympa::Tools::Password;
@@ -2284,7 +2284,7 @@
#read the moderation queue and purge it
- my $modspool = Sympa::Spool->new(
+ my $modspool = Sympa::Spool::SQL->new(
name => 'mod',
base => Sympa::Database->get_singleton()
);
@@ -2293,7 +2293,7 @@
my $message_in_spool = $modspool->get_message({'list'=>$list->{'name'},'robot'=>$robot,'authkey'=>$key});
unless ($message_in_spool) {
## if the message has been accepted via WWSympa, it's in spool 'validated'
- my $validatedspool = Sympa::Spool->new(
+ my $validatedspool = Sympa::Spool::SQL->new(
name => 'validated',
base => Sympa::Database->get_singleton()
);
@@ -2369,7 +2369,7 @@
$what =~ /^\s*(\S+)\s*$/;
my $key = $1; chomp $key;
- my $spool = Sympa::Spool->new(
+ my $spool = Sympa::Spool::SQL->new(
name => 'auth',
base => Sympa::Database->get_singleton()
);
@@ -2552,7 +2552,7 @@
my $name = "$list->{'name'}";
- my $modspool = Sympa::Spool->new(
+ my $modspool = Sympa::Spool::SQL->new(
name => 'mod',
base => Sympa::Database->get_singleton()
);
Modified: branches/sympa-cleanup/src/lib/Sympa/List.pm
(9587 => 9588)
--- branches/sympa-cleanup/src/lib/Sympa/List.pm 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/lib/Sympa/List.pm 2013-07-22 12:14:51 UTC (rev 9588)
@@ -62,7 +62,7 @@
use Sympa::PlainDigest;
use Sympa::Report;
use Sympa::Scenario;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Task;
use Sympa::Template;
use Sympa::Tools::Data;
@@ -3332,7 +3332,7 @@
# rename update topic content id of the message
if ($info_msg_topic) {
- my $topicspool = Sympa::Spool->new(
+ my $topicspool = Sympa::Spool::SQL->new(
name => 'topic',
base => $self->{base}
);
@@ -3550,7 +3550,7 @@
Sympa::Log::Syslog::do_log('debug',"send_msg_disgest(%s)",$messagekey);
# fetch and lock message.
- my $digestspool = Sympa::Spool->new(
+ my $digestspool = Sympa::Spool::SQL->new(
name => 'digest',
base => $self->{base}
);
@@ -4563,7 +4563,7 @@
if ($method eq 'md5'){
# move message to spool mod
- my $spoolmod = Sympa::Spool->new(
+ my $spoolmod = Sympa::Spool::SQL->new(
name => 'mod',
base => $self->{base}
);
@@ -4697,7 +4697,7 @@
my $authkey = Digest::MD5::md5_hex(join('/', $self->get_cookie(),$messageid));
chomp $authkey;
- my $spool = Sympa::Spool->new(
+ my $spool = Sympa::Spool::SQL->new(
name => 'auth',
base => $self->{base}
);
@@ -8648,7 +8648,7 @@
## ignoring message with a no-archive flag
Sympa::Log::Syslog::do_log('info',"Do not archive message with no-archive flag for list %s",$self->get_list_id());
} else {
- my $spoolarchive = Sympa::Spool->new(
+ my $spoolarchive = Sympa::Spool::SQL->new(
name => 'archive',
base => $self->{base}
);
@@ -11117,7 +11117,7 @@
my @now = localtime(time());
- my $digestspool = Sympa::Spool->new(
+ my $digestspool = Sympa::Spool::SQL->new(
name => 'digest',
base => Sympa::Database->get_singleton()
);
@@ -11550,7 +11550,7 @@
my ($self) = @_;
Sympa::Log::Syslog::do_log('debug3', '()');
- my $spool = Sympa::Spool->new(
+ my $spool = Sympa::Spool::SQL->new(
name => 'mod',
base => Sympa::Database->get_singleton()
);
@@ -11832,7 +11832,6 @@
## List of available languages
$::pinfo{'lang'}{'format'} = Sympa::Language::get_supported_languages(
- ->supported_lang
);
## Parameter order
@@ -12744,7 +12743,7 @@
my $topic_item = sprintf "TOPIC $topic_list\n";
$topic_item .= sprintf "METHOD $method\n";
- my $topicspool = Sympa::Spool->new(
+ my $topicspool = Sympa::Spool::SQL->new(
name => 'topic',
base => Sympa::Database->get_singleton()
);
@@ -12783,7 +12782,7 @@
my ($self,$msg_id,$robot) = @_;
Sympa::Log::Syslog::do_log('debug','(%s,%s)',$self->{'name'},$msg_id);
- my $topicspool = Sympa::Spool->new(
+ my $topicspool = Sympa::Spool::SQL->new(
name => 'topic',
base => Sympa::Database->get_singleton()
);
@@ -13062,7 +13061,7 @@
my ($self, $email, $gecos, $custom_attr) = @_;
Sympa::Log::Syslog::do_log('debug2', '(%s, %s, %s)', $self->{'name'}, $email, $gecos, $custom_attr);
- my $subscription_request_spool = Sympa::Spool->new(
+ my $subscription_request_spool = Sympa::Spool::SQL->new(
name => 'subscribe',
base => Sympa::Database->get_singleton()
);
@@ -13097,7 +13096,7 @@
my %subscriptions;
- my $subscription_request_spool = Sympa::Spool->new(
+ my $subscription_request_spool = Sympa::Spool::SQL->new(
name => 'subscribe',
base => Sympa::Database->get_singleton()
);
@@ -13149,7 +13148,7 @@
sub get_subscription_request_count {
my ($self) = @_;
- my $subscription_request_spool = Sympa::Spool->new(
+ my $subscription_request_spool = Sympa::Spool::SQL->new(
name => 'subscribe',
base => Sympa::Database->get_singleton()
);
@@ -13166,7 +13165,7 @@
my ($self, @list_of_email) = @_;
Sympa::Log::Syslog::do_log('debug2', '(%s, %s)', $self->{'name'}, join(',',@list_of_email));
- my $subscription_request_spool = Sympa::Spool->new(
+ my $subscription_request_spool = Sympa::Spool::SQL->new(
name => 'subscribe',
base => Sympa::Database->get_singleton()
);
@@ -13423,7 +13422,7 @@
## Remove tasks for this list
Sympa::Task->load_tasks(
- Sympa::Spool->new(
+ Sympa::Spool::SQL->new(
name => 'task',
base => Sympa::Database->get_singleton()
)
Modified: branches/sympa-cleanup/src/lib/Sympa/Upgrade.pm
(9587 => 9588)
--- branches/sympa-cleanup/src/lib/Sympa/Upgrade.pm 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/lib/Sympa/Upgrade.pm 2013-07-22 12:14:51 UTC (rev 9588)
@@ -43,7 +43,7 @@
use Sympa::Language;
use Sympa::List;
use Sympa::Log::Syslog;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::Password;
use Sympa::Tools::File;
@@ -844,7 +844,7 @@
}
Sympa::Log::Syslog::do_log('notice',"Performing upgrade for spool %s ",$spooldir);
- my $spool = Sympa::Spool->new(
+ my $spool = Sympa::Spool::SQL->new(
name => $spools_def{$spoolparameter},
base => $base
);
Modified: branches/sympa-cleanup/src/sbin/archived.pl.in
(9587 => 9588)
--- branches/sympa-cleanup/src/sbin/archived.pl.in 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/sbin/archived.pl.in 2013-07-22 12:14:51 UTC (rev 9588)
@@ -83,7 +83,7 @@
use Sympa::Log::Database;
use Sympa::Log::Syslog;
use Sympa::Message;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::Time;
use Sympa::Tools::File;
@@ -260,7 +260,7 @@
$SIG{'TERM'} = 'sigterm';
my $end = 0;
-my $spool = Sympa::Spool->new(
+my $spool = Sympa::Spool::SQL->new(
name => 'archive',
base => $base
);
Modified: branches/sympa-cleanup/src/sbin/bounced.pl.in
(9587 => 9588)
--- branches/sympa-cleanup/src/sbin/bounced.pl.in 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/sbin/bounced.pl.in 2013-07-22 12:14:51 UTC (rev 9588)
@@ -73,7 +73,7 @@
use Sympa::Log::Database;
use Sympa::Log::Syslog;
use Sympa::Message;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::Bounce;
use Sympa::Tools::Daemon;
@@ -264,7 +264,7 @@
$SIG{'TERM'} = 'sigterm';
my $end = 0;
-my $spool = Sympa::Spool->new(
+my $spool = Sympa::Spool::SQL->new(
name => 'bounce',
base => $base
);
Modified: branches/sympa-cleanup/src/sbin/bulk.pl.in (9587
=> 9588)
--- branches/sympa-cleanup/src/sbin/bulk.pl.in 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/sbin/bulk.pl.in 2013-07-22 12:14:51 UTC (rev 9588)
@@ -73,7 +73,7 @@
use Sympa::Log::Syslog;
use Sympa::Mail;
use Sympa::Message;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::Daemon;
use Sympa::Tracking;
@@ -230,7 +230,7 @@
Site->maxsmtp = int(Site->maxsmtp/Site->bulk_max_count);
-my $spool = Sympa::Spool->new(
+my $spool = Sympa::Spool::SQL->new(
name => 'bulk',
base => $base
);
Modified: branches/sympa-cleanup/src/sbin/spooler.pl.in
(9587 => 9588)
--- branches/sympa-cleanup/src/sbin/spooler.pl.in 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/sbin/spooler.pl.in 2013-07-22 12:14:51 UTC (rev 9588)
@@ -88,7 +88,7 @@
use Sympa::Lock;
use Sympa::Log::Syslog;
use Sympa::Message;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::Daemon;
@@ -321,11 +321,11 @@
my @qfile;
- my $msgspool = Sympa::Spool->new(
+ my $msgspool = Sympa::Spool::SQL->new(
name => 'msg',
base => Sympa::Database->get_singleton()
);
- my $bouncespool = Sympa::Spool->new(
+ my $bouncespool = Sympa::Spool::SQL->new(
name => 'bounce',
base => Sympa::Database->get_singleton()
);
Modified: branches/sympa-cleanup/src/sbin/sympa.pl.in
(9587 => 9588)
--- branches/sympa-cleanup/src/sbin/sympa.pl.in 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/sbin/sympa.pl.in 2013-07-22 12:14:51 UTC (rev 9588)
@@ -271,7 +271,7 @@
use Sympa::Message;
use Sympa::Report;
use Sympa::Scenario;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::Daemon;
use Sympa::Tools::Password;
@@ -1260,7 +1260,7 @@
my $index_cleanqueue = 0;
my @qfile;
- my $spool = Sympa::Spool->new(
+ my $spool = Sympa::Spool::SQL->new(
name => 'msg',
base => Sympa::Database->get_singleton()
);
@@ -1284,46 +1284,46 @@
if ($index_cleanqueue++ >= 1000){
$index_cleanqueue=0;
- my $msg_bad = Sympa::Spool->new(
+ my $msg_bad = Sympa::Spool::SQL->new(
name => 'msg',
status => 'bad',
base => Sympa::Database->get_singleton()
);
$msg_bad->clean(delay =>Site->clean_delay_queue);
- my $archive_bad = Sympa::Spool->new(
+ my $archive_bad = Sympa::Spool::SQL->new(
name => 'archive',
status => 'bad',
base => Sympa::Database->get_singleton()
);
$archive_bad->clean(delay => Site->clean_delay_queueoutgoing);
- my $queuebounce_bad = Sympa::Spool->new(
+ my $queuebounce_bad = Sympa::Spool::SQL->new(
name => 'bounce',
status => 'bad',
base => Sympa::Database->get_singleton()
);
$archive_bad->clean(delay => Site->clean_delay_queueoutgoing);
$queuebounce_bad->clean(delay =>Site->clean_delay_queuebounce);
- my $queuemod = Sympa::Spool->new(
+ my $queuemod = Sympa::Spool::SQL->new(
name => 'mod',
base => Sympa::Database->get_singleton()
);
$queuemod->clean(delay => Site->clean_delay_queuemod);
- my $queueauth = Sympa::Spool->new(
+ my $queueauth = Sympa::Spool::SQL->new(
name => 'auth',
base => Sympa::Database->get_singleton()
);
$queueauth->clean(delay => Site->clean_delay_queueauth);
- my $queuetopic = Sympa::Spool->new(
+ my $queuetopic = Sympa::Spool::SQL->new(
name => 'topic',
base => Sympa::Database->get_singleton()
);
$queuetopic->clean(delay => Site->clean_delay_queuetopic);
- my $queuesubscribe = Sympa::Spool->new(
+ my $queuesubscribe = Sympa::Spool::SQL->new(
name => 'subscribe',
base => Sympa::Database->get_singleton()
);
$queuesubscribe->clean(delay => Site->clean_delay_queuesubscribe);
- my $queueautomatic = Sympa::Spool->new(
+ my $queueautomatic = Sympa::Spool::SQL->new(
name => 'automatic',
base => Sympa::Database->get_singleton()
);
@@ -2762,7 +2762,7 @@
sub SendDigest{
Sympa::Log::Syslog::do_log('debug', '()');
- my $digestspool = Sympa::Spool->new(
+ my $digestspool = Sympa::Spool::SQL->new(
name => 'digest',
base => Sympa::Database->get_singleton()
);
@@ -2847,7 +2847,7 @@
ETA => 'linear'
});
- my $testing = Sympa::Spool->new(
+ my $testing = Sympa::Spool::SQL->new(
name => 'bad',
base => Sympa::Database->get_singleton()
);
Modified:
branches/sympa-cleanup/src/sbin/task_manager.pl.in (9587
=> 9588)
--- branches/sympa-cleanup/src/sbin/task_manager.pl.in 2013-07-22 12:09:30 UTC (rev 9587)
+++ branches/sympa-cleanup/src/sbin/task_manager.pl.in 2013-07-22 12:14:51 UTC (rev 9588)
@@ -77,7 +77,7 @@
use Sympa::Mail;
use Sympa::Session;
use Sympa::Scenario;
-use Sympa::Spool;
+use Sympa::Spool::SQL;
use Sympa::Tools;
use Sympa::Tools::Time;
use Sympa::Tools::Daemon;
@@ -247,7 +247,7 @@
my $cert_dir = Site->ssl_cert_dir;
my @tasks; # list of tasks in the spool
-my $spool = Sympa::Spool->new(
+my $spool = Sympa::Spool::SQL->new(
name => 'task',
base => $base
);
--
A bug in Sympa? Quick! To
the bug tracker!
|
David Verdin
Infrastructure
pour les Services Informatiques
|
Tél : +33 2 23 23 69 71
Fax : +33 2 23 23 71 21
www.renater.fr
|
RENATER
263 Avenue du Gal Leclerc
35042 Rennes Cedex
|
|