Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80758614
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
Mon, Sep 2, 11:09
Size
474 B
Mime Type
text/x-php
Expires
Wed, Sep 4, 11:09 (2 d)
Engine
blob
Format
Raw Data
Handle
20432877
Attached To
rPH Phabricator
MetaMTAMailReceivedGarbageCollector.php
View Options
<?php
final
class
MetaMTAMailReceivedGarbageCollector
extends
PhabricatorGarbageCollector
{
public
function
collectGarbage
()
{
$ttl
=
phutil_units
(
'90 days in seconds'
);
$table
=
new
PhabricatorMetaMTAReceivedMail
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE dateCreated < %d LIMIT 100'
,
$table
->
getTableName
(),
time
()
-
$ttl
);
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
Event Timeline
Log In to Comment