Limit the size of the queue

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-11-2007, 05:19 PM
New Pligger
 
Join Date: Jan 2007
Posts: 7
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.
Reply With Quote
  #2 (permalink)  
Old 02-11-2007, 05:22 PM
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
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'");

?>
Reply With Quote
  #3 (permalink)  
Old 02-11-2007, 06:16 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 109
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*
Reply With Quote
  #4 (permalink)  
Old 02-11-2007, 06:29 PM
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
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.
Reply With Quote
  #5 (permalink)  
Old 02-11-2007, 06:46 PM
New Pligger
 
Join Date: Jan 2007
Posts: 7
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.
Reply With Quote
  #6 (permalink)  
Old 02-11-2007, 07:23 PM
jitgos's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: Indiana (soon New Hampshire)
Posts: 315
There are some pligg sites with pretty massive content that seem to run just fine, but it probably varies by host. Please let us know the results. I'm very interested.
Reply With Quote
  #7 (permalink)  
Old 02-11-2007, 10:25 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 109
Quote:
Originally Posted by kbeeveer46 View Post
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.
True. But instead of deleting queque, why not just archive it?
Reply With Quote
  #8 (permalink)  
Old 08-03-2008, 07:20 PM
davemackey's Avatar
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 226
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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal error: Allowed memory size of 33554432 bytes exhausted envieme Questions and Comments 11 12-13-2008 03:20 AM
Removing old submissions from the upcoming queue fsdave Questions and Comments 1 06-06-2007 11:39 PM
[Fixed] Tags size limit in IE marcpan Questions and Comments 4 03-24-2007 06:23 AM
Adjustable size of linked site preview jon Questions and Comments 0 03-18-2007 07:32 PM
Changing avatar size - 2 questions revolver Questions and Comments 1 03-13-2007 08:28 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development