Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / people / garbagecollector / PeopleUserLogGarbageCollector.php
blobdaa669540cf62ebdfa5f1670763951598d37e51d
1 <?php
3 final class PeopleUserLogGarbageCollector
4 extends PhabricatorGarbageCollector {
6 const COLLECTORCONST = 'user.logs';
8 public function getCollectorName() {
9 return pht('User Activity Logs');
12 public function getDefaultRetentionPolicy() {
13 return phutil_units('180 days in seconds');
16 protected function collectGarbage() {
17 $table = new PhabricatorUserLog();
18 $conn_w = $table->establishConnection('w');
20 queryfx(
21 $conn_w,
22 'DELETE FROM %T WHERE dateCreated < %d LIMIT 100',
23 $table->getTableName(),
24 $this->getGarbageEpoch());
26 return ($conn_w->getAffectedRows() == 100);