Page MenuHomestyx hydra

HeraldTranscriptGarbageCollector.php
No OneTemporary

HeraldTranscriptGarbageCollector.php

<?php
final class HeraldTranscriptGarbageCollector
extends PhabricatorGarbageCollector {
const COLLECTORCONST = 'herald.transcripts';
public function getCollectorName() {
return pht('Herald Transcripts');
}
public function getDefaultRetentionPolicy() {
return phutil_units('30 days in seconds');
}
protected function collectGarbage() {
$table = new HeraldTranscript();
$conn_w = $table->establishConnection('w');
queryfx(
$conn_w,
'UPDATE %T SET
objectTranscript = "",
ruleTranscripts = "",
conditionTranscripts = "",
applyTranscripts = "",
garbageCollected = 1
WHERE garbageCollected = 0 AND time < %d
LIMIT 100',
$table->getTableName(),
$this->getGarbageEpoch());
return ($conn_w->getAffectedRows() == 100);
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Feb 6, 1:35 AM (8 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33815
Default Alt Text
HeraldTranscriptGarbageCollector.php (869 B)

Event Timeline