[TYPO3-english] Clear Crawler Log Automatically

Walrick Bosch lists at globalhealingcircle.net
Wed Nov 12 13:08:55 CET 2008


Walrick Bosch wrote:
> Hello,
> 
> Is there a way to clear old finished crawler queue entries automatically
> after a certain amount of time? The table is getting huge if I don't
> flush the entries manually.
> 
> Regards,
> 
> Walrick

Ok I found the following in the wiki, which is basically a way to
automate by cron what I did manually using phpMyAdmin. But I agree wikt
the comment on the end that a configuration setting would be a better
solution. I don't want to delete jobs that are still pending. Maybe
something like delete from table tx_crawler_queue where status is
finished would be a solution. (This is just an example I didn't actually
check field names and such yet.)

http://wiki.typo3.org/index.php/Crawler#Clear_the_joblist_in_the_queue

----
Clear the joblist in the queue

If you do not like that the joblist (the crawler queue) (the table
crawler_queue) grows too large, you could do the following: Put a new
script like this
<shellScript> :


#!/bin/bash
mysql –user=USERNAME –password=PASSWORD –database=DATABASENAME -e
‘TRUNCATE TABLE tx_crawler_queue’


somewhere where you can execute it. (replace USERNAME etc with the
corresponding values for your Installation of Typo3). Check that you can
really execute the script from the command line. (Is the crawler-log in
the Info->Site Crawler module empty?). Then configure a cronjob that
executes this script from time to time to empty the crawler log. For
example: If you create the joblist once a week, you could run this
script before you create the joblist.)

WARNING: This is a very simple "solution" to get rid of an ever-growing
joblist. This script empties the entire queue, regardless whether a job
is finished or still pending. A better solution would be if the crawler
could be configured in an way that every job that is done is deleted
from the queue, or if jobs that are finished and older than x days are
deleted.
-----



-- 
webmaster Global Healing Circle
www.globalhealingcircle.net


More information about the TYPO3-english mailing list