Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93537254
FeedStoryNotificationGarbageCollector.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, Nov 29, 13:31
Size
512 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 13:31 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22661740
Attached To
rPH Phabricator
FeedStoryNotificationGarbageCollector.php
View Options
<?php
final
class
FeedStoryNotificationGarbageCollector
extends
PhabricatorGarbageCollector
{
public
function
collectGarbage
()
{
$ttl
=
90
*
24
*
60
*
60
;
$table
=
new
PhabricatorFeedStoryNotification
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE chronologicalKey < (%d << 32)
ORDER BY chronologicalKey ASC LIMIT 100'
,
$table
->
getTableName
(),
time
()
-
$ttl
);
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
Event Timeline
Log In to Comment