Page MenuHomestyx hydra

MetaMTAMailSentGarbageCollector.php
No OneTemporary

MetaMTAMailSentGarbageCollector.php

<?php
final class MetaMTAMailSentGarbageCollector
extends PhabricatorGarbageCollector {
const COLLECTORCONST = 'metamta.sent';
public function getCollectorName() {
return pht('Mail (Sent)');
}
public function getDefaultRetentionPolicy() {
return phutil_units('90 days in seconds');
}
protected function collectGarbage() {
$mails = id(new PhabricatorMetaMTAMail())->loadAllWhere(
'dateCreated < %d LIMIT 100',
$this->getGarbageEpoch());
$engine = new PhabricatorDestructionEngine();
foreach ($mails as $mail) {
$engine->destroyObject($mail);
}
return (count($mails) == 100);
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Feb 6, 1:18 AM (8 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33720
Default Alt Text
MetaMTAMailSentGarbageCollector.php (648 B)

Event Timeline