projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
74314f4
)
Prune.php
author
Alan Knowles
<alan@roojs.com>
Fri, 14 Nov 2014 03:39:48 +0000
(11:39 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 14 Nov 2014 03:39:48 +0000
(11:39 +0800)
Prune.php
patch
|
blob
|
history
diff --git
a/Prune.php
b/Prune.php
index
da83a42
..
a8f65a3
100644
(file)
--- a/
Prune.php
+++ b/
Prune.php
@@
-38,14
+38,7
@@
class Pman_Core_Prune extends Pman
{
// prune irrelivant stuff..
{
// prune irrelivant stuff..
- $f = DB_DataObject::Factory('reader_article');
- $f->query("
- DELETE FROM Events where
- event_when < NOW() - INTERVAL 6 MONTH
- AND
- action IN ('RELOAD', 'LOGIN')
- LIMIT 100000
- ");
+
$this->prune((int)$opts['months']);
$this->prune((int)$opts['months']);
@@
-61,6
+54,17
@@
class Pman_Core_Prune extends Pman
event_when < NOW() - INTERVAL {$inM} MONTH
LIMIT 100000
");
event_when < NOW() - INTERVAL {$inM} MONTH
LIMIT 100000
");
+
+ // notificication events occur alot - so we should trash them more frequently..
+ $f = DB_DataObject::Factory('reader_article');
+ $f->query("
+ DELETE FROM Events where
+ event_when < NOW() - INTERVAL 1 MONTH
+ AND
+ action IN ('RELOAD', 'LOGIN')
+ LIMIT 100000
+ ");
+
// pruning is for our press project - so we do not clean up dependant tables at present..
if (function_exists('posix_getpwuid')) {
// pruning is for our press project - so we do not clean up dependant tables at present..
if (function_exists('posix_getpwuid')) {