src/Rocketeer/Services/Connections/Coordinator.php
protected function computeNumberOfTargets()
    {
        $targets = [];

        /** @var ConnectionInterface[] $connections */
        $connections = $this->connections->getActiveConnections();
        foreach ($connections as $connection) {
            $stages = $this->connections->getAvailableStages();
            $connectionKey = $connection->getConnectionKey();

            $targets[$connectionKey->name] = count($connectionKey->servers) * count($stages);
        }

        return array_sum($targets);
    }
protected function computeNumberOfTargets()
    {
        $targets = [];

        /** @var ConnectionInterface[] $connections */
        $connections = $this->connections->getActiveConnections();
        foreach ($connections as $connection) {
            $stages = $this->connections->getAvailableStages();
            $connectionKey = $connection->getConnectionKey();

            $targets[$connectionKey->name] = count($connectionKey->servers) * count($stages);
        }

        return array_sum($targets);
    }
protected function computeNumberOfTargets ( ) { $ targets = [ ] ; /** @var ConnectionInterface[] $connections */ $ connections = $ this -> connections -> getActiveConnections ( ) ; foreach ( $ connections as $ connection ) { $ stages = $ this -> connections -> getAvailableStages ( ) ; $ connectionKey = $ connection -> getConnectionKey ( ) ; $ targets [ $ connectionKey -> name ] = count ( $ connectionKey -> servers ) * count ( $ stages ) ; } return array_sum ( $ targets ) ; }
Get the number of servers to wait for
before triggering a promise.

@return int
Get the number of servers to wait for before triggering a promise .