Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/PhabricatorTriggerDaemon.php
| Show First 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | if ($next && (PhabricatorTime::getNow() >= $next)) { | ||||
| $all_collectors = PhabricatorGarbageCollector::getAllCollectors(); | $all_collectors = PhabricatorGarbageCollector::getAllCollectors(); | ||||
| $this->garbageCollectors = $all_collectors; | $this->garbageCollectors = $all_collectors; | ||||
| } | } | ||||
| // If we're in a collection cycle, continue collection. | // If we're in a collection cycle, continue collection. | ||||
| if ($this->garbageCollectors) { | if ($this->garbageCollectors) { | ||||
| foreach ($this->garbageCollectors as $key => $collector) { | foreach ($this->garbageCollectors as $key => $collector) { | ||||
| $more_garbage = $collector->collectGarbage(); | $more_garbage = $collector->runCollector(); | ||||
| if (!$more_garbage) { | if (!$more_garbage) { | ||||
| unset($this->garbageCollectors[$key]); | unset($this->garbageCollectors[$key]); | ||||
| } | } | ||||
| // We only run one collection per call, to prevent triggers from being | // We only run one collection per call, to prevent triggers from being | ||||
| // thrown too far off schedule if there's a lot of garbage to collect. | // thrown too far off schedule if there's a lot of garbage to collect. | ||||
| break; | break; | ||||
| } | } | ||||
| Show All 15 Lines | |||||