src/Pool.php
function addMaintainedWorker(\CharlotteDunois\Phoebe\Worker $worker) {
        if($worker->isRunning()) {
            throw new \LogicException('Worker is already running');
        }
        
        $worker->id = \bin2hex(\random_bytes(10));
        $this->messenger->prepareWorker($worker);
        
        $worker->start(static::WORKER_START_OPTIONS);
        $this->workers[$worker->id] = $worker;
        
        return $worker;
    }
function addMaintainedWorker(\CharlotteDunois\Phoebe\Worker $worker) {
        if($worker->isRunning()) {
            throw new \LogicException('Worker is already running');
        }
        
        $worker->id = \bin2hex(\random_bytes(10));
        $this->messenger->prepareWorker($worker);
        
        $worker->start(static::WORKER_START_OPTIONS);
        $this->workers[$worker->id] = $worker;
        
        return $worker;
    }
Add a maintained worker to the pool. The worker **MUST NOT** be started - it will be started automatically.
The worker gets assigned an ID property. Communication will be added.
This worker will **not** be used to loadbalance work. It will only get added to the pool for messaging.
If the worker should do work, the user has to submit the work to this specific worker.
@param \CharlotteDunois\Phoebe\Worker  $worker
@return \CharlotteDunois\Phoebe\Worker
@throws \LogicException