Listens queue and runs each job.

@param bool $repeat whether to continue listening when queue is empty.
@param int $timeout number of seconds to wait for next message.
@return null|int exit code.
@internal for worker command only.
@since 2.0.2