3 final class ConduitTokenGarbageCollector
4 extends PhabricatorGarbageCollector
{
6 const COLLECTORCONST
= 'conduit.tokens';
8 public function getCollectorName() {
9 return pht('Conduit Tokens');
12 public function hasAutomaticPolicy() {
16 protected function collectGarbage() {
17 $table = new PhabricatorConduitToken();
18 $conn_w = $table->establishConnection('w');
22 'DELETE FROM %T WHERE expires <= %d
23 ORDER BY dateCreated ASC LIMIT 100',
24 $table->getTableName(),
25 PhabricatorTime
::getNow());
27 return ($conn_w->getAffectedRows() == 100);