Author: poeml Date: 2009-03-06 05:30:26 -0700 (Fri, 06 Mar 2009) New Revision: 6726 Modified: trunk/tools/download-redirector-v2/scanner/scanner.pl Log: scanner: - the -e (enable) option was another one that was not passed to spawned scanners, when scanning multiple mirrors. Fixed now. - enabling after scan was not working anymore in cases where no old files had to be purged, because the $file_count variable was abused for that purpose Modified: trunk/tools/download-redirector-v2/scanner/scanner.pl =================================================================== --- trunk/tools/download-redirector-v2/scanner/scanner.pl 2009-03-06 11:25:51 UTC (rev 6725) +++ trunk/tools/download-redirector-v2/scanner/scanner.pl 2009-03-06 12:30:26 UTC (rev 6726) _at_@ -309,6 +309,7 @@ push _at_cmd, '-I', $item; } push _at_cmd, '-f' if $force_scan; + push _at_cmd, '-e' if $enable_after_scan; push _at_cmd, '-x' if $extra_schedule_run; push _at_cmd, '-k' if $keep_dead_files; push _at_cmd, '-d', $start_dir if length $start_dir; _at_@ -395,14 +396,14 @@ $sql = "SELECT COUNT(mirr_del_byid($row->{id}, id)) FROM temp1"; print "$sql\n" if $sqlverbose; $ary_ref = $dbh->selectall_arrayref($sql) or die $dbh->errstr(); - $file_count = defined($ary_ref->[0]) ? $ary_ref->[0][0] : 0; - print localtime(time) . " $row->{identifier}: files to be purged: $file_count\n"; + my $purge_file_count = defined($ary_ref->[0]) ? $ary_ref->[0][0] : 0; + print localtime(time) . " $row->{identifier}: files to be purged: $purge_file_count\n"; $sql = "SELECT COUNT(*) FROM filearr WHERE $row->{id} = ANY(mirrors);"; print "$sql\n" if $sqlverbose; my $ary_ref = $dbh->selectall_arrayref($sql) or die $dbh->errstr(); - my $file_count = defined($ary_ref->[0]) ? $ary_ref->[0][0] : 0; + $file_count = defined($ary_ref->[0]) ? $ary_ref->[0][0] : 0; print localtime(time) . " $row->{identifier}: number of files: $file_count\n"; _______________________________________________ Opensuse-svn mailing list Opensuse-svn_at_forge.novell.com http://forge.novell.com/mailman/listinfo/opensuse-svn _______________________________________________ mirrorbrain-commits mailing list Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Fri Mar 06 2009 - 12:30:54 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT