protected function dueToMonitor()
    {
        // We will keep track of the amount of time between attempting to acquire the
        // lock to monitor the wait times. We only want a single supervisor to run
        // the checks on a given interval so that we don't fire too many events.
        if (! $this->lastMonitored) {
            $this->lastMonitored = Chronos::now();
        }

        if (! $this->timeToMonitor()) {
            return false;
        }

        // Next we will update the monitor timestamp and attempt to acquire a lock to
        // check the wait times. We use Redis to do it in order to have the atomic
        // operation required. This will avoid any deadlocks or race conditions.
        $this->lastMonitored = Chronos::now();

        return $this->metrics->acquireWaitTimeMonitorLock();
    }
protected function dueToMonitor()
    {
        // We will keep track of the amount of time between attempting to acquire the
        // lock to monitor the wait times. We only want a single supervisor to run
        // the checks on a given interval so that we don't fire too many events.
        if (! $this->lastMonitored) {
            $this->lastMonitored = Chronos::now();
        }

        if (! $this->timeToMonitor()) {
            return false;
        }

        // Next we will update the monitor timestamp and attempt to acquire a lock to
        // check the wait times. We use Redis to do it in order to have the atomic
        // operation required. This will avoid any deadlocks or race conditions.
        $this->lastMonitored = Chronos::now();

        return $this->metrics->acquireWaitTimeMonitorLock();
    }
protected function dueToMonitor ( ) { // We will keep track of the amount of time between attempting to acquire the // lock to monitor the wait times. We only want a single supervisor to run // the checks on a given interval so that we don't fire too many events. if ( ! $ this -> lastMonitored ) { $ this -> lastMonitored = Chronos :: now ( ) ; } if ( ! $ this -> timeToMonitor ( ) ) { return false ; } // Next we will update the monitor timestamp and attempt to acquire a lock to // check the wait times. We use Redis to do it in order to have the atomic // operation required. This will avoid any deadlocks or race conditions. $ this -> lastMonitored = Chronos :: now ( ) ; return $ this -> metrics -> acquireWaitTimeMonitorLock ( ) ; }
Determine if monitoring is due.

@return bool
Determine if monitoring is due .