<commit_before>import logging
import socket
import pickle

import pika

from .helpers import retry

logger = logging.getLogger(__name__)


class Queue(object):

    def __init__(self, name, connection):
        self.name = name
        self.connection = connection
        self._channel = None

    @property
    def channel(self):
        if self._channel is None:
            self._channel = self.connection.channel()

        self._channel.queue_declare(queue=self.name, durable=True,
                                   exclusive=False, auto_delete=False)<commit_msg>cleanup<commit_after>import logging
import pickle

import pika

logger = logging.getLogger(__name__)


class Queue(object):

    def __init__(self, name, connection):
        self.name = name
        self.connection = connection
        self._channel = None

    @property
    def channel(self):
        if self._channel is None:
            self._channel = self.connection.channel()

        self._channel.queue_declare(queue=self.name, durable=True,
                                   exclusive=False, auto_delete=False)
{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 2.44794952681388, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '604073', 'n_tokens_mistral': 295, 'n_tokens_neox': 284, 'n_words': 71}