[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/metamta/garbagecollector/ -> MetaMTAMailReceivedGarbageCollector.php (source)

   1  <?php
   2  
   3  final class MetaMTAMailReceivedGarbageCollector
   4    extends PhabricatorGarbageCollector {
   5  
   6    public function collectGarbage() {
   7      $ttl = phutil_units('90 days in seconds');
   8  
   9      $table = new PhabricatorMetaMTAReceivedMail();
  10      $conn_w = $table->establishConnection('w');
  11  
  12      queryfx(
  13        $conn_w,
  14        'DELETE FROM %T WHERE dateCreated < %d LIMIT 100',
  15        $table->getTableName(),
  16        time() - $ttl);
  17  
  18      return ($conn_w->getAffectedRows() == 100);
  19    }
  20  
  21  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1