Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F549622
MetaMTAMailSentGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
648 B
Referenced Files
None
Subscribers
None
MetaMTAMailSentGarbageCollector.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 2:14 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
120822
Default Alt Text
MetaMTAMailSentGarbageCollector.php (648 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment