I don't see how you can cap the size of the queue. Is there an option to set the number of items or the length of time items are queued before deleting them?
I now have over 5,000 queued items, and I think that may be slowing performance of the site. I would like to automatically delete items that do not get published.
I'm using Pligg 9, DigitalNature, on a DreamHost account. Here's the site:
http://helpthing.com/
Thanks.
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Limit the size of the queue |
| ||||
|
Create a php file and put this in it and run it as a cron job. It will delete any discarded stories and any unpublished stories after 14 days. Make sure to enter your database details. Code: <?php
mysql_connect("dbhost", "dbname", "dbpass") or die("error1");
mysql_select_db("dbname") or die("error2");
$fourteen_days = 1209600;
$now = date("U") - $fourteen_days;
$now = date("Y-m-d H:i:s",$now);
mysql_query("delete from links where link_date < '$now' AND link_status = 'queued'");
mysql_query("delete from links where link_status = 'discard'");
?>
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| |||
|
Guys, you are doing mistake by deleting unpublished stories after 14 days. It's better to have more content on your site so search engines can crawl more links... *just a thought* |
| ||||
|
Daniel, some people have limitations on their database size set by their hosting company so they have to delete stories or they will run out of space. It should take a long time before this happens, though. Also, some people really don't care about Google page rank or being index.
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| |||
|
Generally, I agree regarding the neverending database. I'd prefer it that way. However, I've been suspecting that some of my performance issues were related to the queue, and I wanted to do some tests around that.
|
| |||
| Quote:
|
| ||||
|
This could be a cool feature to have? The ability to archive/delete stories that meet certain parameters from the admin. For example: - Stories never voted on after x days. - Discarded stories after x days. David.
__________________ - Informed Networker - Social News for Network Engineers and System Administrators. |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fatal error: Allowed memory size of 33554432 bytes exhausted | envieme | Bug Report | 10 | 08-19-2008 12:19 AM |
| Removing old submissions from the upcoming queue | fsdave | General Help | 1 | 06-06-2007 10:39 PM |
| [Fixed] Tags size limit in IE | marcpan | Bug Report | 4 | 03-24-2007 05:23 AM |
| Adjustable size of linked site preview | jon | Suggestions | 0 | 03-18-2007 06:32 PM |
| Changing avatar size - 2 questions | revolver | Template Support | 1 | 03-13-2007 07:28 AM |





Linear Mode

