Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / conduit / garbagecollector / ConduitTokenGarbageCollector.php
blobfab142b8e86a4e208518fda65cc7d4fb1ae1e6f0
1 <?php
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() {
13 return true;
16 protected function collectGarbage() {
17 $table = new PhabricatorConduitToken();
18 $conn_w = $table->establishConnection('w');
20 queryfx(
21 $conn_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);