diff options
| author | fukachan <fukachan> | 2001-09-13 14:43:28 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-09-13 14:43:28 +0000 |
| commit | daf5f05fe7796ab03380543ee332f48bdc6e50f3 (patch) | |
| tree | 49ddecbc99fc4d29fc1c9ad221b7b2ad6b9edf51 /fml/lib/FML/Process/QueueManager.pm | |
| parent | e2dc6f626625f183d870384fac8ce9b508df3c46 (diff) | |
| download | fml8-daf5f05fe7796ab03380543ee332f48bdc6e50f3.tar.gz fml8-daf5f05fe7796ab03380543ee332f48bdc6e50f3.tar.bz2 fml8-daf5f05fe7796ab03380543ee332f48bdc6e50f3.zip | |
send() can take queue id as the argument
Diffstat (limited to 'fml/lib/FML/Process/QueueManager.pm')
| -rw-r--r-- | fml/lib/FML/Process/QueueManager.pm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/QueueManager.pm b/fml/lib/FML/Process/QueueManager.pm index b131c1e0..409f4d1c 100644 --- a/fml/lib/FML/Process/QueueManager.pm +++ b/fml/lib/FML/Process/QueueManager.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: QueueManager.pm,v 1.2 2001/05/19 03:40:36 fukachan Exp $ +# $FML: QueueManager.pm,v 1.3 2001/05/29 16:21:16 fukachan Exp $ # package FML::Process::QueueManager; @@ -22,6 +22,12 @@ FML::Process::QueueManager - provide queue manipulation functions my $obj = new FML::Process::QueueManager { directory => $queue_dir }; $obj->send($curproc); +or if you send specific queue C<$queue_id>, use + + $obj->send($curproc, $queue_id); + +where C<$queue_id> is like this 1000390413.14775.1 not file path. + =head1 DESCRIPTION not yet implemented. @@ -51,20 +57,21 @@ sub new } -=head2 C<send($curproc)> +=head2 C<send($curproc, $id)> try to send all mails in the queue. +If queue id C<$id> is specified, send queue for C<$id>. =cut sub send { - my ($self, $curproc) = @_; + my ($self, $curproc, $id) = @_; my $queue_dir = $self->{ _directory }; use Mail::Delivery::Queue; my $queue = new Mail::Delivery::Queue { directory => $queue_dir }; - my $ra = $queue->list(); + my $ra = defined $id ? [ $id ] : $queue->list(); for my $qid (@$ra) { my $q = new Mail::Delivery::Queue { |
