Skip to content

Commit

Permalink
adjust rule
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD committed Aug 15, 2024
1 parent 0496ac1 commit ea928a2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/dandi_s3_log_parser/_log_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ def find_all_known_operation_types(
position=0,
leave=True,
):
for buffered_text_reader in BufferedTextReader(file_path=raw_s3_log_file_path):
slice_bound = 200
for raw_log_line in buffered_text_reader:
fields = raw_log_line[:slice_bound].split(" ")
while len(fields) < 7:
slice_bound += 100
fields = raw_log_line[:slice_bound].split(" ")
field = fields[7]
unique_operation_types.add(field)
operation_types_per_file = {
raw_log_line.split(" ")[7]
for buffered_text_reader in BufferedTextReader(file_path=raw_s3_log_file_path)
for raw_log_line in buffered_text_reader
}

unique_operation_types.update(operation_types_per_file)

return unique_operation_types

0 comments on commit ea928a2

Please sign in to comment.