DataObjects/Core_notify_blacklist.php
authorAlan <alan@roojs.com>
Fri, 6 Oct 2023 06:39:38 +0000 (14:39 +0800)
committerAlan <alan@roojs.com>
Fri, 6 Oct 2023 06:39:38 +0000 (14:39 +0800)
DataObjects/Core_notify_blacklist.php

index 58276f1..84437d7 100644 (file)
@@ -36,4 +36,13 @@ class Pman_Core_DataObjects_Core_notify_blacklist extends DB_DataObject
         return false;
     }
     
+    // delete blacklists older than 1 week (and try again)
+    function prune()
+    {
+        $this->query("
+            DELETE FROM {$this->tableName()} where added_dt < NOW()  - 1 WEEK
+        ");
+            
+    }
+    
 }
\ No newline at end of file