Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-11-2007, 04:19 PM
New Pligger
 
Join Date: Jan 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Limit the size of the queue

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, 04:22 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
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.
Reply With Quote
  #3 (permalink)  
Old 02-11-2007, 05:16 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 114
Thanks: 6
Thanked 0 Times in 0 Posts
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, 05:29 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
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.
Reply With Quote
  #5 (permalink)  
Old 02-11-2007, 05:46 PM
New Pligger
 
Join Date: Jan 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
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, 06:23 PM
jitgos's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: Indiana (soon New Hampshire)
Posts: 339
Thanks: 94
Thanked 49 Times in 38 Posts
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, 09:25 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 114
Thanks: 6
Thanked 0 Times in 0 Posts
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, 06:20 PM
davemackey's Avatar
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 286
Thanks: 33
Thanked 18 Times in 14 Posts
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
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
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


Search Engine Friendly URLs by vBSEO 3.2.0