Oha, this sounds really useful. Any comment from ruslan if this is save?<br><br>I have to shred several houndret thousend tickets from 2002-2007 and we need also around 2 minutes per ticket, will try it out tomorrow!<br><br>
Thanks for sharing this<br><br>Torsten<br><br><div class="gmail_quote">2009/11/23 Maxwell A. Rathbone <span dir="ltr"><<a href="mailto:mrathbone@sagonet.com">mrathbone@sagonet.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I'm in the same boat as many others I've seen post. We have 35k tickets<br>
in one of our queues that I'm trying to shred(shame on us for not<br>
automating this previously). I've found the web version of the Shredder<br>
to be god-awful slow. We're talking 10min+ just to shred ONE ticket. So<br>
I discovered the command-line /opt/rt3/sbin/rt-shredder utility. I was<br>
then able to shred ONE ticket in about 5 minutes. I found some<br>
optimization keys to add to the tables, which allowed me to them shred<br>
ONE ticket in about a minute. I then discovered(this really should be in<br>
the documentation!), that if you specify a timeframe with rt-shredder,<br>
you can get MUCH faster processing. I was able to get it down to<br>
21seconds for the shredding of ONE ticket.<br>
<br>
I noticed it was spitting out warning messages each time it deletes<br>
something. I honestly do not care about the output as long as it is<br>
working as expected, so I hunted through the code and was able to<br>
disable the on-screen logging altogether. I'm now able to shred ONE<br>
ticket in about 8-10 seconds.<br>
<br>
For those who are interested in about a 50% reduction in processing time<br>
for the CLI Shredder, edit the file:<br>
/opt/rt3/lib/RT/Shredder/Rercord.pm<br>
<br>
Look for this line:<br>
    $RT::Logger->warning( $msg );<br>
<br>
Comment it so it looks like this:<br>
#    $RT::Logger->warning( $msg );<br>
<br>
a WORLD of difference from the 10 minutes per ticket I originally was<br>
getting. Now it looks like to shred the 35k might actually take a<br>
palatable amount of time.<br>
<br>
I wanted to share this useful information on the list so it is google<br>
searchable. I'm SURE others will find this helpful.<br>
<br>
BTW, the command I'm using to shred(again, documentation is kinda poor) is:<br>
./rt-shredder --plugin "Tickets=query,((status = 'deleted' OR status =<br>
'rejected') AND<br>
LastUpdated='2008-10-03');limit,100;with_linked,FALSE;apply_query_to_linked,FALSE"<br>
--force<br>
<br>
Max<br>
_______________________________________________<br>
<a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users" target="_blank">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br>
<br>
Community help: <a href="http://wiki.bestpractical.com" target="_blank">http://wiki.bestpractical.com</a><br>
Commercial support: <a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a><br>
<br>
<br>
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>MFG<br><br>Torsten Brumm<br><br><a href="http://www.brumm.me">http://www.brumm.me</a><br><a href="http://www.elektrofeld.de">http://www.elektrofeld.de</a><br>