Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102678684
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
Sun, Feb 23, 04:26
Size
538 B
Mime Type
text/x-php
Expires
Tue, Feb 25, 04:26 (1 d, 14 h)
Engine
blob
Format
Raw Data
Handle
24319557
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