PHPDaemon\Thread\Worker::appInstancesReloadReady PHP Method

appInstancesReloadReady() protected method

Asks the running applications the whether we can go to shutdown current (old) worker.
protected appInstancesReloadReady ( ) : boolean
return boolean - Ready?
    protected function appInstancesReloadReady()
    {
        $ready = true;
        foreach (Daemon::$appInstances as $k => $app) {
            foreach ($app as $name => $appInstance) {
                if (!$appInstance->handleStatus($this->graceful ? AppInstance::EVENT_GRACEFUL_SHUTDOWN : AppInstance::EVENT_SHUTDOWN)) {
                    $this->log(__METHOD__ . ': waiting for ' . $k . ':' . $name);
                    $ready = false;
                }
            }
        }
        return $ready;
    }