=================================================================== RCS file: /cvs/wpscripts/zlist/zlist,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- wpscripts/zlist/zlist 2011/08/04 12:48:31 1.7 +++ wpscripts/zlist/zlist 2011/12/21 09:33:05 1.8 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: zlist,v 1.7 2011/08/04 12:48:31 yason Exp $ +# $Id: zlist,v 1.8 2011/12/21 09:33:05 yason Exp $ use DBI; use Term::ANSIColor qw(:constants); use Time::HiRes qw(gettimeofday tv_interval); @@ -79,11 +79,11 @@ print "\n"; - # fetch probas - db_fetch(1); +# fetch probas +db_fetch(1); -# print "****** probas ($#numcard) ******\n"; - print BOLD WHITE ON_BLUE "Probas queue". RESET . " ($#numcard pcs.) :\n"; +#print "****** probas ($#numcard) ******\n"; +print BOLD WHITE ON_BLUE "Probas queue". RESET . " ($#numcard pcs.) :\n"; $i = 0; while( ($numcard[$i]) ) { @@ -91,9 +91,35 @@ $i++; $total++; } - print "\n"; +print "\n"; +# fetch TT +db_fetch(2); +print BOLD WHITE ON_BLUE "TT queue". RESET . " ($#numcard pcs.) :\n"; + $i = 0; + while( ($numcard[$i]) ) + { + print "$numcard[$i]\t[ executed $time[$i], priority=$pri[$i], file=$path[$i] (size=$size[$i]) ]\n"; + $i++; + $total++; + } +print "\n"; + +# fetch jpeg +db_fetch(3); + +print BOLD WHITE ON_BLUE "jpeg queue". RESET . " ($#numcard pcs.) :\n"; + $i = 0; + while( ($numcard[$i]) ) + { + print "$numcard[$i]\t[ executed $time[$i], priority=$pri[$i], file=$path[$i] (size=$size[$i]) ]\n"; + $i++; + $total++; + } +print "\n"; + + # print summary information print BOLD WHITE . "Total: " . RESET . "$total files in queue.\n"; @@ -143,6 +169,8 @@ # remove first symbols to get only filename (i.e. \\fileserver\zayavki\ - 21 symbols) $path[$i] = substr($path[$i], 21) if ($type_file == 0); #zayavki $path[$i] = substr($path[$i], 19) if ($type_file == 1); #proba + $path[$i] = substr($path[$i], 16) if ($type_file == 2); #TT + $path[$i] = substr($path[$i], 18) if ($type_file == 2); #jpeg # make local file path $searchpath =~ tr/\\/\//;