Page MenuHomePhorge

HeraldWebhookRequestGarbageCollector.php
No OneTemporary

Size
654 B
Referenced Files
None
Subscribers
None

HeraldWebhookRequestGarbageCollector.php

<?php
final class HeraldWebhookRequestGarbageCollector
extends PhabricatorGarbageCollector {
const COLLECTORCONST = 'herald.webhooks';
public function getCollectorName() {
return pht('Herald Webhooks');
}
public function getDefaultRetentionPolicy() {
return phutil_units('7 days in seconds');
}
protected function collectGarbage() {
$table = new HeraldWebhookRequest();
$conn_w = $table->establishConnection('w');
queryfx(
$conn_w,
'DELETE FROM %T WHERE dateCreated < %d LIMIT 100',
$table->getTableName(),
$this->getGarbageEpoch());
return ($conn_w->getAffectedRows() == 100);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 2:05 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
123186
Default Alt Text
HeraldWebhookRequestGarbageCollector.php (654 B)

Event Timeline