[rt-users] Further RTx::Shredder Errors

Mathew Snyder theillien at yahoo.com
Thu Feb 22 00:05:35 EST 2007


I'm looking through the code for Shredder.pm trying to figure this out.  I see a
PutResolver method as well as ApplyResolver method.  However, I'm coming up
short on how to tell it what to use as the dependency resolver.  Using the CLI I
would run
rtx-shredder --force --plugin
'Users=status,any;email,address;replace_relations,Nobody'

How do I fit this in using the API?

Mathew


Mathew Snyder wrote:
>>From this
> 
> RTx::Shredder::Init( force => 1 );
> my $shredder = new RTx::Shredder(RT::SystemUser);
> if ($ans =~ m/^(y|yes)$/i){
> #       my ($fname, $fh) = $shredder->SetFile( FromStorage => 0, FileName =>
> ’/usr/local/rt-3.6.1/var/data/RTx-Shredder/Shredder-Users_XXXX.sql’ );
>         my $email;
>         foreach $email (@emails){
>                 my $user = new RT::User(RT::SystemUser);
>                 $user->LoadByEmail($email);
>                 next unless $user->id;
>                 $shredder->PutObject(Object => $user);
>         }
>         $shredder->WipeoutAll;
> #               system "/usr/local/rt-3.6.1/local/sbin/rtx-shredder --force
> --plugin 'Users=status,any;email,$email;replace_relations,Nobody'";
> #
> system("/usr/local/rt-3.6.1/local/sbin/rtx-shredder","--force","--plugin","Users=status,any;email,$email;replace_relations,Nobody");
> }
> 
> I get this
> 
> [Wed Feb 21 08:44:20 2007] [crit]: Couldn't wipeout object: Couldn't find
> resolver for dependency 'RT::User-240410 (depends on,resolvable dependency)
> RT::Attachment-270285' at /usr/local/rt-3.6.1/local/lib/RTx/Shredder.pm line
> 393. (/usr/local/rt-3.6.1/lib/RT.pm:317)
> Couldn't wipeout object: Couldn't find resolver for dependency 'RT::User-240410
> (depends on,resolvable dependency) RT::Attachment-270285' at
> /usr/local/rt-3.6.1/local/lib/RTx/Shredder.pm line 393.
> 
> Can someone shed some light on why this is failing?
> 
> Also, the above, commented-out line regarding SetFile produces this
> 
> Unrecognized character \xE2 at ./delete_spam_users.pl line 91
> 
> I don't know what the \xE2 is as I couldn't find anything on Google about it.
> 
> Mathew
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
> 



More information about the rt-users mailing list