3 final class PhabricatorFileExternalRequestGarbageCollector
4 extends PhabricatorGarbageCollector
{
6 const COLLECTORCONST
= 'files.externalttl';
8 public function getCollectorName() {
9 return pht('External Requests (TTL)');
12 public function hasAutomaticPolicy() {
16 protected function collectGarbage() {
17 $file_requests = id(new PhabricatorFileExternalRequest())->loadAllWhere(
19 PhabricatorTime
::getNow());
20 $engine = new PhabricatorDestructionEngine();
21 foreach ($file_requests as $request) {
22 $engine->destroyObject($request);
25 return (count($file_requests) == 100);