rev 1489 - trunk/siesta/bin

[prev] [thread] [next] [lurker] [Date index for 2004/03/02]

From: simon
Subject: rev 1489 - trunk/siesta/bin
Date: 14:27 on 02 Mar 2004
Author: simon
Date: 2004-03-02 14:27:34 +0000 (Tue, 02 Mar 2004)
New Revision: 1489

Modified:
   trunk/siesta/bin/nacho
Log:
Make (delete|resume)-deferred abale to take multiple params


Modified: trunk/siesta/bin/nacho
===================================================================
--- trunk/siesta/bin/nacho	2004-03-02 12:14:41 UTC (rev 1488)
+++ trunk/siesta/bin/nacho	2004-03-02 14:27:34 UTC (rev 1489)
@@ -666,30 +666,39 @@
 };
 
 
-=head2 resume-deferred deferred_id
+=head2 resume-deferred [  deferred_id ... ]
 
-Resume a deferred message.
+Resume a deferred message(s).
 
 =cut
 
 $commands{'resume-deferred'} = sub {
-    my $mess_id = shift;
 
-    my $message = Siesta::Deferred->retrieve($mess_id)
-      or die "No such deferred message\n";
+    foreach my $mess_id (@_) {
+        my $message = Siesta::Deferred->retrieve($mess_id)
+          or die "No such deferred message\n";
 
-    $message->resume;
-    print "Sucessfully resumed message $mess_id\n";
+        $message->resume;
+        print "Sucessfully resumed message $mess_id\n";
+    }
 };
 
+=head2 delete-deferred [  deferred_id ... ]
+
+Delete a deferred message(s).
+
+=cut
+
 $commands{'delete-deferred'} = sub {
-    my $mess_id = shift;
+ 
+   foreach my $mess_id (@_) {
 
-    my $message = Siesta::Deferred->retrieve($mess_id)
-      or die "No such deferred message\n";
+        my $message = Siesta::Deferred->retrieve($mess_id)
+          or die "No such deferred message\n";
 
-    $message->delete;
-    print "Message deleted from deferral queue\n";
+        $message->delete;
+        print "Message deleted from deferral queue\n";
+    }
 };
 
 

Generated at 13:57 on 01 Jul 2004 by mariachi 0.52