<commit_before>#!/usr/bin/env python

# Copyright (C) 2011 <NAME>
# Distributed under the MIT license, see the LICENSE file for details.

from acoustid.script import run_script
from acoustid.data.submission import import_queued_submissions


def main(script, opts, args):
    conn = script.engine.connect()
    with conn.begin():
        import_queued_submissions(conn, limit=150)

run_script(main)
<commit_msg>Don't use a global transaction for importing submissions<commit_after>#!/usr/bin/env python

# Copyright (C) 2011 <NAME>
# Distributed under the MIT license, see the LICENSE file for details.

from acoustid.script import run_script
from acoustid.data.submission import import_queued_submissions


def main(script, opts, args):
    conn = script.engine.connect()
    import_queued_submissions(conn, limit=150)

run_script(main)

{'fraction_non_alphanumeric': 0.08949880668257756, 'fraction_numerical': 0.016706443914081145, 'mean_word_length': 5.124087591240876, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2539563', 'n_tokens_mistral': 277, 'n_tokens_neox': 251, 'n_words': 77}