[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class ConduitLogGarbageCollector 4 extends PhabricatorGarbageCollector { 5 6 public function collectGarbage() { 7 $key = 'gcdaemon.ttl.conduit-logs'; 8 $ttl = PhabricatorEnv::getEnvConfig($key); 9 if ($ttl <= 0) { 10 return false; 11 } 12 13 $table = new PhabricatorConduitMethodCallLog(); 14 $conn_w = $table->establishConnection('w'); 15 queryfx( 16 $conn_w, 17 'DELETE FROM %T WHERE dateCreated < %d 18 ORDER BY dateCreated ASC LIMIT 100', 19 $table->getTableName(), 20 time() - $ttl); 21 22 return ($conn_w->getAffectedRows() == 100); 23 } 24 25 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |