def _run_pass(self):
while True:<EOL><INDENT>try:<EOL><INDENT>data = self._file.read(<NUM_LIT>)<EOL><DEDENT>except IOError as e:<EOL><INDENT>if e.errno == errno.ESTALE:<EOL><INDENT>self.active = False<EOL>return False<EOL><DEDENT><DEDENT>lines = self._buffer_extract(data)<EOL>if not lines:<EOL><INDENT>if self._current_event and time.time() - self._last_activity > <NUM_LIT:1>:<EOL><INDENT>event = '<STR_LIT:\n>'.join(self._current_event)<EOL>self._current_event.clear()<EOL>self._callback_wrapper([event])<EOL><DEDENT>break<EOL><DEDENT>self._last_activity = time.time()<EOL>if self._multiline_regex_after or self._multiline_regex_before:<EOL><INDENT>events = multiline_merge(<EOL>lines,<EOL>self._current_event,<EOL>self._multiline_regex_after,<EOL>self._multiline_regex_before)<EOL><DEDENT>else:<EOL><INDENT>events = lines<EOL><DEDENT>if events:<EOL><INDENT>self._callback_wrapper(events)<EOL><DEDENT>if self._sincedb_path:<EOL><INDENT>current_line_count = len(lines)<EOL>self._sincedb_update_position(lines=current_line_count)<EOL><DEDENT><DEDENT>self._sincedb_update_position()<EOL>
Read lines from a file and performs a callback against them