Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112295706
MetaMTAMailSentGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, May 9, 18:18
Size
420 B
Mime Type
text/x-php
Expires
Sun, May 11, 18:18 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26071365
Attached To
rPH Phabricator
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
()
-
$ttl
);
foreach
(
$mails
as
$mail
)
{
$mail
->
delete
();
}
return
(
count
(
$mails
)
==
100
);
}
}
Event Timeline
Log In to Comment