]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
queuerunner.pl: Only print if doing something (quieter cron mails)
authorIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 13:06:39 +0000 (14:06 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 13:06:39 +0000 (14:06 +0100)
TODO
scripts/queuerunner.pl

diff --git a/TODO b/TODO
index 503f182accde174d7a0ad6bea38849e14180db6c..8433c62196d8d679a3dd4c457d35ad15bc9ee01e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,3 @@
-queuerunner.pl:
- - silence unless there is a message in the queue or an error occurs. (makes cron mails more
-   useful) 
-
 control.pl:
  - followup <BUGID> (shortcut for "graft <BUGID> !")
  - way to reference the root of the thread. (From iwj)
index 6ff9ca0eba268179eb580b68080aeb1e59690d59..d6126bf544bda0836258a01f0bc992816a024b97 100755 (executable)
@@ -22,11 +22,11 @@ $| = 1;
 
 my @ids;
 
-print STDOUT "Process $$ running queue runner\n";
+#print STDOUT "Process $$ running queue runner\n";
 
 while (1) {
     if ( -f "queuerunner.stop" ) {
-        print( STDERR "stopping on request\n" ) or die $!;
+        print( STDERR "[$$] stopping on request\n" ) or die $!;
         last;
     }
     if ( !@ids ) {
@@ -42,7 +42,7 @@ while (1) {
 
     my $c;
     if ( $id =~ m/^A/ ) {
-        print( STDOUT "[$nf] $id maildrop ..." ) || die $!;
+        print( STDOUT "[$$] [$nf] $id maildrop ..." ) || die $!;
         defined( $c = fork ) || die $!;
         if ( !$c ) {
             exec( "$Emesinae::Paths::SCRIPTS_DIR/insertmail.pl", $id );
@@ -50,7 +50,7 @@ while (1) {
         }
     }
     elsif ( $id =~ m/^C/ ) {
-        print( STDOUT "[$nf] $id control ..." ) || die $!;
+        print( STDOUT "[$$] [$nf] $id control ..." ) || die $!;
         defined( $c = fork ) || die $!;
         if ( !$c ) {
             exec( "$Emesinae::Paths::SCRIPTS_DIR/control.pl", $id );
@@ -58,7 +58,7 @@ while (1) {
         }
     }
     elsif ( $id =~ m/^O/ ) {
-        print( STDOUT "[$nf] $id outgoing ..." ) || die $!;
+        print( STDOUT "[$$] [$nf] $id outgoing ..." ) || die $!;
         defined( $c = fork ) || die $!;
         if ( !$c ) {
             exec( "$Emesinae::Paths::SCRIPTS_DIR/sendmail.pl", $id );
@@ -72,7 +72,7 @@ while (1) {
     $cc == $c || die "$cc $c $!";
     my $status = $?;
     if ($status) {
-        print( STDERR "$id: process failed ($status $!) - now in [GP]$id\n" )
+        print( STDERR "[$$] $id: process failed ($status $!) - now in [GP]$id\n" )
           || die $!;
     }
     print( STDOUT " done\n" ) || die $!;