Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2992390
PhabricatorDaemonLogGarbageCollector.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
647 B
Referenced Files
None
Subscribers
None
PhabricatorDaemonLogGarbageCollector.php
View Options
<?php
final
class
PhabricatorDaemonLogGarbageCollector
extends
PhabricatorGarbageCollector
{
const
COLLECTORCONST
=
'daemon.logs'
;
public
function
getCollectorName
(
)
{
return
pht
(
'Daemon Logs'
)
;
}
public
function
getDefaultRetentionPolicy
(
)
{
return
phutil_units
(
'7 days in seconds'
)
;
}
protected
function
collectGarbage
(
)
{
$table
=
new
PhabricatorDaemonLog
(
)
;
$conn_w
=
$table
->
establishConnection
(
'w'
)
;
queryfx
(
$conn_w
,
'DELETE FROM %T WHERE dateModified < %d LIMIT 100'
,
$table
->
getTableName
(
)
,
$this
->
getGarbageEpoch
(
)
)
;
return
(
$conn_w
->
getAffectedRows
(
)
==
100
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 23, 08:18 (1 d, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1149329
Default Alt Text
PhabricatorDaemonLogGarbageCollector.php (647 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment