Commit 48d0b33b authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Configurable parser matching size.

parent 12177199
Pipeline #54106 passed with stages
in 19 minutes and 28 seconds
......@@ -199,6 +199,7 @@ release = 'devel'
domain = 'DFT'
service = 'unknown nomad service'
auxfile_cutoff = 100
parser_matching_size = 9128
console_log_level = logging.WARNING
......
......@@ -116,7 +116,7 @@ def match_parser(mainfile: str, upload_files: Union[str, files.StagingUploadFile
compression, open_compressed = _compressions.get(f.read(3), (None, open))
with open_compressed(mainfile_path, 'rb') as cf:
buffer = cf.read(2048)
buffer = cf.read(config.parser_matching_size)
mime_type = magic.from_buffer(buffer, mime=True)
for parser in parsers:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment