Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/bot/PhabricatorBot.php
| Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | final class PhabricatorBot extends PhabricatorDaemon { | ||||
| } | } | ||||
| public function getConfig($key, $default = null) { | public function getConfig($key, $default = null) { | ||||
| return idx($this->config, $key, $default); | return idx($this->config, $key, $default); | ||||
| } | } | ||||
| private function runLoop() { | private function runLoop() { | ||||
| do { | do { | ||||
| PhabricatorCaches::destroyRequestCache(); | |||||
| $this->stillWorking(); | $this->stillWorking(); | ||||
| $messages = $this->protocolAdapter->getNextMessages($this->pollFrequency); | $messages = $this->protocolAdapter->getNextMessages($this->pollFrequency); | ||||
| if (count($messages) > 0) { | if (count($messages) > 0) { | ||||
| foreach ($messages as $message) { | foreach ($messages as $message) { | ||||
| $this->routeMessage($message); | $this->routeMessage($message); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||