<commit_before># -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

from .processor import MinidumpProcessor

from uwsgidecoratorsfallback import spool

import logging

logger = logging.getLogger(__name__)

@spool
def do_process_uploaded_crash(env):
    minproc = MinidumpProcessor()
    minproc.process(env['crash_id'])
    logger.info('processed: %s' % (env['crash_id']))

# vim:set shiftwidth=4 softtabstop=4 expandtab: */<commit_msg>make the uwsgi spooler code also work with the fallback<commit_after># -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

from .processor import MinidumpProcessor

from uwsgidecoratorsfallback import spool

import logging

logger = logging.getLogger(__name__)

@spool
def do_process_uploaded_crash(*args, **kwargs):
    minproc = MinidumpProcessor()
    minproc.process(kwargs['crash_id'])
    logger.info('processed: %s' % (kwargs['crash_id']))

# vim:set shiftwidth=4 softtabstop=4 expandtab: */
{'fraction_non_alphanumeric': 0.12142857142857143, 'fraction_numerical': 0.011428571428571429, 'mean_word_length': 4.409266409266409, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7574996', 'n_tokens_mistral': 472, 'n_tokens_neox': 459, 'n_words': 146}