RT-Shredder and the Limit Argument

Good afternoon,

I’m working on deleting some 14,000 older tickets in RT 4.4.1. I keep seeing a “limit” argument referenced in the docs and posts online, but I can find any hard documentation on it. I’d like to confirm how it functions.

From what I’ve gathered, it has a default limit of 10. If I were to run the command below, no matter the number of tickets the query pulls in, it will only delete 10 tickets and then exit? Or does it process 10 at a time, and exit upon completion?

rt-shredder --plugin ‘Tickets=query,LastUpdated < ‘2014-01-04’ AND ( Status = ‘resolved’ OR Status = ‘rejected’ )’

Following that logic, If I ran the second command below, it would delete 100 tickets, then exit, or process in batches of 100, then exit when complete?

rt-shredder --plugin ‘Tickets=query,LastUpdated < ‘2014-01-04’ AND ( Status = ‘resolved’ OR Status = ‘rejected’ );limit,100’

Thanks for your help, and let me know if more info is needed.

You’re right; the documentation is a bit sparse on what limit does. In those situations though the fact that RT is open source lets us take a peek at what it is doing internally, which is setting a RowsPerPage in a search object to the specified limit. A quick look at the DBIx::SearchBuilder.pm documentation confirms that this limits the number of rows delivered by the database.

Jon