Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111403724
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
Thu, May 1, 09:34
Size
420 B
Mime Type
text/x-php
Expires
Sat, May 3, 09:34 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25919254
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