fix spawn_cmd in Cron so anyone can use it
authorDirk Koopman <djk@tobit.co.uk>
Thu, 21 May 2020 16:47:33 +0000 (17:47 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Thu, 21 May 2020 16:47:33 +0000 (17:47 +0100)
perl/DXCron.pm
perl/DXUser.pm

index d2a109332aa2a89206b72463ba27af618bb25849..16d27cddd03f051cad1feaa3dc7e0b37ac008644 100644 (file)
@@ -305,7 +305,6 @@ sub spawn_cmd
                                 }
                                 for (@res) {
                                         if (ref $chan) {
-                                                dbg("send: $_");
                                                 $chan->send($_);
                                         } elsif (isdbg('cron')) {
                                                 dbg("$pkg::spawn_cmd: $_");
@@ -316,6 +315,7 @@ sub spawn_cmd
                                 diffms($pkg, "::spawn_cmd", $line, $t0, scalar @res) if isdbg('progress');
                         }
                        );
+       return ();
 }
 
 # do an rcmd to another cluster from the crontab
index 3ad8d5c2849bb6fda63b7e4653b67ec0ff6607a0..79f8eff9143fc13869e07274156f91e30fd9dc06 100644 (file)
@@ -937,7 +937,7 @@ sub readinjson
 
        # $ifh is "global" and should not be closed
        
-       dbg("DXUser::readinjson $count record headers read from $fn in ". _diffms($ta) . " mS");
+       LogDbg('DXUser',"DXUser::readinjson $count record headers read from $fn in ". _diffms($ta) . " mS");
        return $totusers = $count;
 }
 
@@ -966,7 +966,7 @@ sub writeoutjson
        }
        
        $ofh->close;
-       dbg("DXUser::writeoutjson $count records written to $ofn in ". _diffms($ta) . " mS");
+       LogDbg('DXUser',"DXUser::writeoutjson $count records written to $ofn in ". _diffms($ta) . " mS");
        return $count;
 }
 1;