Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2339779
MetaMTAMailSentGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
413 B
Referenced Files
None
Subscribers
None
MetaMTAMailSentGarbageCollector.php
View Options
<?php
final
class
MetaMTAMailSentGarbageCollector
extends
PhabricatorGarbageCollector
{
public
function
collectGarbage
()
{
$ttl
=
phutil_units
(
'90 days in seconds'
);
$mails
=
id
(
new
PhabricatorMetaMTAMail
())->
loadAllWhere
(
'dateCreated < %d LIMIT 100'
,
PhabricatorTime
::
getNow
());
foreach
(
$mails
as
$mail
)
{
$mail
->
delete
();
}
return
(
count
(
$mails
)
==
100
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 9:17 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
444662
Default Alt Text
MetaMTAMailSentGarbageCollector.php (413 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment