def process_queue()

in pyscripts/docker_log_processor.py [0:0]


    def process_queue(self):
        """
        Process the line objects in the queue, and print as formatted.
        """
        last_timestamp = datetime.now() + timedelta(days=-364)
        line_count = 0
        split_char = u"\u2588"
        while True:
            log_line = self.queue.get()
            logline_timestamp = log_line.timestamp
            if (
                "HORTON: Entering function" in log_line.log_data
                or "HORTON: Exiting function" in log_line.log_data
            ):
                date_delta = logline_timestamp.isoformat(timespec="microseconds")
            else:
                date_delta = self.get_timestamp_delta(
                    logline_timestamp.isoformat(timespec="microseconds"),
                    last_timestamp.isoformat(timespec="microseconds"),
                    line_count,
                )
            line_count += 1
            last_timestamp = logline_timestamp
            out_line = (
                log_line.module_name
                + " : "
                + date_delta
                + " "
                + split_char
                + " "
                + log_line.log_data
            )
            try:
                print(out_line)
            except Exception:
                print("".join([i if ord(i) < 128 else "#" for i in out_line]))