diff --git a/textarchive/lib/TA/ObjReg.pm b/textarchive/lib/TA/ObjReg.pm index e7e94402bc62bcbe4506e688e2b7b64d096bb326..93a61d8d0452d2b8162837c806412fd7a5050221 100644 --- a/textarchive/lib/TA/ObjReg.pm +++ b/textarchive/lib/TA/ObjReg.pm @@ -24,6 +24,10 @@ use Util::MongoDB; my %plugins_loaded= (); +# TODO: this should come from the config! +# my $POLICY_MIN_SIZE; +my $POLICY_MIN_SIZE= 1_000_000; + sub new { my $class= shift; @@ -718,8 +722,10 @@ sub check_policy my %ign_keys; %ign_keys= map { $_ => 1 } @$ign_keys if (defined ($ign_keys)); my $replica_map= get_replica_map ($rs_list); -my $MIN_SIZE= 10_000_000; # TODO: this should come from the config! - my $cursor= $objreg->{'_cat'}->find ( { fs_size => { '$gt' => $MIN_SIZE } } ); + my $search; + $search->{fs_size}= { '$gt' => $POLICY_MIN_SIZE } if (defined ($POLICY_MIN_SIZE) && $POLICY_MIN_SIZE); + + my $cursor= $objreg->{'_cat'}->find ($search); my %items= (); my $item_count= 0;