Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123255945
PhabricatorDaemonLogGarbageCollector.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
Sat, Jul 26, 00:55
Size
533 B
Mime Type
text/x-php
Expires
Mon, Jul 28, 00:55 (2 d)
Engine
blob
Format
Raw Data
Handle
27672645
Attached To
rPH Phabricator
PhabricatorDaemonLogGarbageCollector.php
View Options
<?php
final
class
PhabricatorDaemonLogGarbageCollector
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