<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Run a worker for the job queue.

:Copyright: 2006-2016 <NAME>
:License: Modified BSD, see LICENSE for details.
"""

import sys

from rq import Worker

from bootstrap.util import app_context, get_config_filename_from_env
from byceps.util.jobqueue import connection, get_queue


def get_config_filename():
    try:
        return get_config_filename_from_env()
    except Exception as e:
        sys.stderr.write(str(e) + '\n')
        sys.exit()


if __name__ == '__main__':
    config_filename = get_config_filename()

    with app_context(config_filename):
        with connection():
            queues = [get_queue()]

            worker = Worker(queues)
            worker.work()
<commit_msg>Fix imports<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Run a worker for the job queue.

:Copyright: 2006-2016 <NAME>
:License: Modified BSD, see LICENSE for details.
"""

import sys

from rq import Worker

from byceps.util.jobqueue import connection, get_queue
from byceps.util.system import get_config_filename_from_env

from bootstrap.util import app_context


def get_config_filename():
    try:
        return get_config_filename_from_env()
    except Exception as e:
        sys.stderr.write(str(e) + '\n')
        sys.exit()


if __name__ == '__main__':
    config_filename = get_config_filename()

    with app_context(config_filename):
        with connection():
            queues = [get_queue()]

            worker = Worker(queues)
            worker.work()

{'fraction_non_alphanumeric': 0.1078114912846998, 'fraction_numerical': 0.011620400258231117, 'mean_word_length': 3.0789473684210527, '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': '1810154', 'n_tokens_mistral': 502, 'n_tokens_neox': 475, 'n_words': 130}