library/Garp/Model/Db/ClusterServer.php
public function checkIn() {
        $now = date('Y-m-d H:i:s');
        $serverRow = $this->_fetchServerRow();

        if (!$serverRow) {
            $serverRow = $this->createRow();
            $serverRow->hostname = gethostname();
            $lastCheckIn = $now;
        } else {
            $lastCheckIn = $serverRow->modified;
        }

        //  set the modified date manually, to make sure the record is updated.
        $serverRow->modified = $now;
        $serverId = $serverRow->save();

        return array(
            $serverId,
            $lastCheckIn
        );
    }
public function checkIn() {
        $now = date('Y-m-d H:i:s');
        $serverRow = $this->_fetchServerRow();

        if (!$serverRow) {
            $serverRow = $this->createRow();
            $serverRow->hostname = gethostname();
            $lastCheckIn = $now;
        } else {
            $lastCheckIn = $serverRow->modified;
        }

        //  set the modified date manually, to make sure the record is updated.
        $serverRow->modified = $now;
        $serverId = $serverRow->save();

        return array(
            $serverId,
            $lastCheckIn
        );
    }
public function checkIn ( ) { $ now = date ( 'Y-m-d H:i:s' ) ; $ serverRow = $ this -> _fetchServerRow ( ) ; if ( ! $ serverRow ) { $ serverRow = $ this -> createRow ( ) ; $ serverRow -> hostname = gethostname ( ) ; $ lastCheckIn = $ now ; } else { $ lastCheckIn = $ serverRow -> modified ; } //  set the modified date manually, to make sure the record is updated. $ serverRow -> modified = $ now ; $ serverId = $ serverRow -> save ( ) ; return array ( $ serverId , $ lastCheckIn ) ; }
Registers this server node in the ClusterServer table, and returns information about the current server.
@return Array Numeric array, containing the serverId and the last check-in time.
Registers this server node in the ClusterServer table and returns information about the current server .