Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Call a callback for each item in an iterable containing structured
log entries

:param log_iter: Iterator returning structured log entries
:param action_map: Dictionary mapping action name to callback function. Log items
                   with actions not in this dictionary will be skipped.

        def each_log(log_iter, action_map):
    """Call a callback for each item in an iterable containing structured
    log entries

    :param log_iter: Iterator returning structured log entries
    :param action_map: Dictionary mapping action name to callback function. Log items
                       with actions not in this dictionary will be skipped.
    """
    for item in log_iter:
        if item["action"] in action_map:
            action_map[item["action"]](item)
        


src/w/p/wptrunner-0.2.5/wptrunner/reduce.py   wptrunner(Download)
                statuses[None].add(item["status"])
 
        reader.each_log(reader.read(log_f),
                        {"test_status": handle_status,
                         "test_end": handle_end})

src/w/p/wptrunner-0.2.5/wptrunner/metadata.py   wptrunner(Download)
    def update_from_log(self, log_file):
        self.run_info = None
        log_reader = reader.read(log_file)
        reader.each_log(log_reader, self.action_map)