Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110846037
PhabricatorDaemonLogEventGarbageCollector.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, Apr 28, 09:59
Size
538 B
Mime Type
text/x-php
Expires
Wed, Apr 30, 09:59 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25855857
Attached To
rPH Phabricator
PhabricatorDaemonLogEventGarbageCollector.php
View Options
<?php
final
class
PhabricatorDaemonLogEventGarbageCollector
extends
PhabricatorGarbageCollector
{
public
function
collectGarbage
()
{
$ttl
=
PhabricatorEnv
::
getEnvConfig
(
'gcdaemon.ttl.daemon-logs'
);
if
(
$ttl
<=
0
)
{
return
false
;
}
$table
=
new
PhabricatorDaemonLogEvent
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE epoch < %d LIMIT 100'
,
$table
->
getTableName
(),
time
()
-
$ttl
);
return
(
$conn_w
->
getAffectedRows
()
==
100
);
}
}
Event Timeline
Log In to Comment