public function update(Supervisor $supervisor)
    {
        $processes = $supervisor->processPools->mapWithKeys(function ($pool) use ($supervisor) {
            return [$supervisor->options->connection.':'.$pool->queue() => count($pool->processes())];
        })->toJson();

        $this->connection()->pipeline(function ($pipe) use ($supervisor, $processes) {
            $pipe->hmset(
                'supervisor:'.$supervisor->name, [
                    'name' => $supervisor->name,
                    'master' => explode(':', $supervisor->name)[0],
                    'pid' => $supervisor->pid(),
                    'status' => $supervisor->working ? 'running' : 'paused',
                    'processes' => $processes,
                    'options' => $supervisor->options->toJson(),
                ]
            );

            $pipe->zadd('supervisors',
                Chronos::now()->getTimestamp(), $supervisor->name
            );

            $pipe->expire('supervisor:'.$supervisor->name, 30);
        });
    }
public function update(Supervisor $supervisor)
    {
        $processes = $supervisor->processPools->mapWithKeys(function ($pool) use ($supervisor) {
            return [$supervisor->options->connection.':'.$pool->queue() => count($pool->processes())];
        })->toJson();

        $this->connection()->pipeline(function ($pipe) use ($supervisor, $processes) {
            $pipe->hmset(
                'supervisor:'.$supervisor->name, [
                    'name' => $supervisor->name,
                    'master' => explode(':', $supervisor->name)[0],
                    'pid' => $supervisor->pid(),
                    'status' => $supervisor->working ? 'running' : 'paused',
                    'processes' => $processes,
                    'options' => $supervisor->options->toJson(),
                ]
            );

            $pipe->zadd('supervisors',
                Chronos::now()->getTimestamp(), $supervisor->name
            );

            $pipe->expire('supervisor:'.$supervisor->name, 30);
        });
    }
public function update ( Supervisor $ supervisor ) { $ processes = $ supervisor -> processPools -> mapWithKeys ( function ( $ pool ) use ( $ supervisor ) { return [ $ supervisor -> options -> connection . ':' . $ pool -> queue ( ) => count ( $ pool -> processes ( ) ) ] ; } ) -> toJson ( ) ; $ this -> connection ( ) -> pipeline ( function ( $ pipe ) use ( $ supervisor , $ processes ) { $ pipe -> hmset ( 'supervisor:' . $ supervisor -> name , [ 'name' => $ supervisor -> name , 'master' => explode ( ':' , $ supervisor -> name ) [ 0 ] , 'pid' => $ supervisor -> pid ( ) , 'status' => $ supervisor -> working ? 'running' : 'paused' , 'processes' => $ processes , 'options' => $ supervisor -> options -> toJson ( ) , ] ) ; $ pipe -> zadd ( 'supervisors' , Chronos :: now ( ) -> getTimestamp ( ) , $ supervisor -> name ) ; $ pipe -> expire ( 'supervisor:' . $ supervisor -> name , 30 ) ; } ) ; }
Update the information about the given supervisor process.

@param  \Laravel\Horizon\Supervisor  $supervisor
@return void
Update the information about the given supervisor process .