def _work(self, burst=False, logging_level=logging.INFO):
setup_loghandlers(logging_level)<EOL>self._install_signal_handlers()<EOL>self.did_perform_work = False<EOL>self.register_birth()<EOL>self.log.info(<EOL>"<STR_LIT>".format(<EOL>self.gevent_pool.size, self.key, VERSION<EOL>)<EOL>)<EOL>self.set_state(WorkerStatus.STARTED)<EOL>try:<EOL><INDENT>while True:<EOL><INDENT>try:<EOL><INDENT>self.check_for_suspension(burst)<EOL>if self.should_run_maintenance_tasks:<EOL><INDENT>self.clean_registries()<EOL><DEDENT>if self._stop_requested:<EOL><INDENT>self.log.info("<STR_LIT>")<EOL>break<EOL><DEDENT>timeout = None if burst else max(<NUM_LIT:1>, self.default_worker_ttl - <NUM_LIT>)<EOL>result = self.dequeue_job_and_maintain_ttl(timeout)<EOL>if result is None and burst:<EOL><INDENT>self.log.info("<STR_LIT>".format(self.key))<EOL>try:<EOL><INDENT>gevent.wait(self.children)<EOL><DEDENT>except LoopExit:<EOL><INDENT>pass<EOL><DEDENT>result = self.dequeue_job_and_maintain_ttl(timeout)<EOL><DEDENT>if result is None:<EOL><INDENT>break<EOL><DEDENT><DEDENT>except StopRequested:<EOL><INDENT>break<EOL><DEDENT>job, queue = result<EOL>self.execute_job(job, queue)<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>if not self.is_horse:<EOL><INDENT>self.register_death()<EOL><DEDENT><DEDENT>return self.did_perform_work<EOL>
Starts the work loop.

        Pops and performs all jobs on the current list of queues.  When all
        queues are empty, block and wait for new jobs to arrive on any of the
        queues, unless `burst` mode is enabled.

        The return value indicates whether any jobs were processed.