REBELinBLUE\Deployer\Project::heartbeatsStatus PHP Method

heartbeatsStatus() public method

Count the missed heartbeat.
public heartbeatsStatus ( ) : array
return array
    public function heartbeatsStatus()
    {
        if (empty($this->heartbeatStatus)) {
            $length = count($this->heartbeats);
            $missed = 0;
            foreach ($this->heartbeats as $beat) {
                if (!$beat->isHealthy()) {
                    $missed++;
                }
            }
            $this->heartbeatStatus = ['missed' => $missed, 'length' => $length];
        }
        return $this->heartbeatStatus;
    }