def run(self):
        set_process_title("Cron scheduler process")

        self.log = logging.getLogger()
        for x in self.log.handlers:
            self.log.removeHandler(x)

        configure_logging(
            level=self.log_level,
            format='%(asctime)-15s %(process)d cron_scheduler %(levelname).1s: '
                '%(message)s',
            filename=self.log_filename,
        )

        self.log.debug("Starting")

        backend = get_backend()
        self.log.info("Loaded backend %s", backend)

        while self.running.value:
            try:
                self.tick(backend)

                # Sleep until the next second boundary. This corrects for skew
                # caused by the accumulation of tick() runtime.
                time.sleep((1 - time.time() % 1))
            except __HOLE__:
                sys.exit(1)

        self.log.info("Exiting")
dataset/ETHPy150Open thread/django-lightweight-queue/django_lightweight_queue/cron_scheduler.py/CronScheduler.run