docs: def run(self):
          """
          Child process. Repeatedly call :meth:`loop` method every
          :attribute:`interval` seconds.
          """
          setproctitle.setproctitle("{:s}: {:s}".format(
              self.context.config.name, self.__class__.__name__))
          self.logger.info(
              "Worker '%s' has been started with pid %d",
              self.__class__.__name__, os.getpid())
  
          # Register SIGINT handler which will exit service process
          def sigint_handler(unused_signum, unused_frame):
              """
              Exit service process when SIGINT is reached.
              """
              self.stop()
          signal.signal(signal.SIGINT, sigint_handler)
  
          # Initialize logging
          self.context.config.configure_logging()
          # Initialize child
          self.context.initialize_child(SERVICE_PROCESS, process=self)
  
          next_loop_time = 0
          while 1:
              # Exit if pid of the parent process has changed (parent process
              # has exited and init is new parent) or if stop flag is set.
              if os.getppid() != self._parent_pid or self._stop_event.is_set():
                  break
              # Repeatedly call loop method. After first call set ready flag.
              if time.time() >= next_loop_time:
                  try:
                      self.loop()
                  except Exception:
                      self.logger.exception(
                          "Worker '%s' failed", self.__class__.__name__)
                  else:
                      if not next_loop_time and not self.ready:
                          self._ready.value = True
                  next_loop_time = time.time() + self.interval
              else:
                  time.sleep(0.25)