public function setMemoryLimit($memoryLimit)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker memory limit after worker has started working');
        }

        $this->memoryLimit = $memoryLimit;
    }