def run(self) -> None:
if self._logging_level:<EOL><INDENT>logging.basicConfig(<EOL>level=getattr(logging, self._logging_level.upper()),<EOL>format="<STR_LIT>")<EOL><DEDENT>signal.signal(signal.SIGINT, self._handle_sigint)<EOL>signal.signal(signal.SIGTERM, self._handle_sigterm)<EOL>if platform.system() != '<STR_LIT>':<EOL><INDENT>signal.signal(signal.SIGHUP, self._handle_sighup)<EOL>signal.signal(signal.SIGUSR1, self._handle_sigusr1)<EOL>signal.signal(signal.SIGUSR2, self._handle_sigusr2)<EOL><DEDENT>self._started_at = os.times().elapsed<EOL>for t in self._threads:<EOL><INDENT>t.start()<EOL><DEDENT>try:<EOL><INDENT>signals.worker_start.send(self.kuyruk, worker=self)<EOL>self._consume_messages()<EOL>signals.worker_shutdown.send(self.kuyruk, worker=self)<EOL><DEDENT>finally:<EOL><INDENT>self.shutdown_pending.set()<EOL>for t in self._threads:<EOL><INDENT>t.join()<EOL><DEDENT><DEDENT>logger.debug("<STR_LIT>")<EOL>
Runs the worker and consumes messages from RabbitMQ.
        Returns only after `shutdown()` is called.