public function poll()
    {
        $latest = $this->eye->api()->composer();

        if (is_null($latest)) {
            return;
        }

        History::where('type', 'composer')->delete();

        History::create([
            'type' => 'composer',
            'meta' => 'composer',
            'record' => $latest
        ]);

        if ($latest === []) {
            if ($this->eye->status()->isSick('composer')) {
                $this->eye->notifier()->alert(new Safe);
            }

            $this->eye->status()->setHealthy('composer');
        } else {
            if ($this->eye->status()->isHealthy('composer')) {
                $this->eye->notifier()->alert(new Risk);
            }

            $this->eye->status()->setSick('composer');
        }
    }
public function poll()
    {
        $latest = $this->eye->api()->composer();

        if (is_null($latest)) {
            return;
        }

        History::where('type', 'composer')->delete();

        History::create([
            'type' => 'composer',
            'meta' => 'composer',
            'record' => $latest
        ]);

        if ($latest === []) {
            if ($this->eye->status()->isSick('composer')) {
                $this->eye->notifier()->alert(new Safe);
            }

            $this->eye->status()->setHealthy('composer');
        } else {
            if ($this->eye->status()->isHealthy('composer')) {
                $this->eye->notifier()->alert(new Risk);
            }

            $this->eye->status()->setSick('composer');
        }
    }
public function poll ( ) { $ latest = $ this -> eye -> api ( ) -> composer ( ) ; if ( is_null ( $ latest ) ) { return ; } History :: where ( 'type' , 'composer' ) -> delete ( ) ; History :: create ( [ 'type' => 'composer' , 'meta' => 'composer' , 'record' => $ latest ] ) ; if ( $ latest === [ ] ) { if ( $ this -> eye -> status ( ) -> isSick ( 'composer' ) ) { $ this -> eye -> notifier ( ) -> alert ( new Safe ) ; } $ this -> eye -> status ( ) -> setHealthy ( 'composer' ) ; } else { if ( $ this -> eye -> status ( ) -> isHealthy ( 'composer' ) ) { $ this -> eye -> notifier ( ) -> alert ( new Risk ) ; } $ this -> eye -> status ( ) -> setSick ( 'composer' ) ; } }
Poll the Composer for its checks.

@return void
Poll the Composer for its checks .