Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98883153
MetaMTAMailReceivedGarbageCollector.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, Jan 17, 04:53
Size
665 B
Mime Type
text/x-php
Expires
Sun, Jan 19, 04:53 (2 d)
Engine
blob
Format
Raw Data
Handle
23660897
Attached To
rPH Phabricator
MetaMTAMailReceivedGarbageCollector.php
View Options
<?php
final
class
MetaMTAMailReceivedGarbageCollector
extends
PhabricatorGarbageCollector
{
const
COLLECTORCONST
=
'metamta.received'
;
public
function
getCollectorName
()
{
return
pht
(
'Mail (Received)'
);
}
public
function
getDefaultRetentionPolicy
()
{
return
phutil_units
(
'90 days in seconds'
);
}
protected
function
collectGarbage
()
{
$table
=
new
PhabricatorMetaMTAReceivedMail
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE dateCreated < %d LIMIT 100'
,
$table
->
getTableName
(),
$this
->
getGarbageEpoch
());
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
Event Timeline
Log In to Comment