<commit_before>from uuid import uuid4
from pprint import pformat
from telephus.protocol import ManagedCassandraClientFactory
from telephus.client import CassandraClient
from twisted.web.resource import Resource
from twisted.internet import reactor, task
from twisted.web import server
from twisted.internet.defer import inlineCallbacks, returnValue, DeferredList
import logging
from .mixins import MySQLMixin, IdentityQueueMixin
from .base import BaseServer
from telephus.cassandra.ttypes import NotFoundException


logger = logging.getLogger(__name__)


class IdentityServer(BaseServer, MySQLMixin, IdentityQueueMixin):

    name = "HiiSpider Identity Server UUID: %s" % str(uuid4())
    simultaneous_jobs = 50
    active_jobs = 0
    updating_connections = {}
    updating_identities = {}
    connections_queue = []
    connectionsloop = None
    dequeueloop = None
    queue_requests = 0

    def __init__(self, config, port=None):
        super(IdentityServer, self).__init__(config)
        self.plugin_mapping = config["plugin_mapping"]
        self.setupMySQL(config)<commit_msg>revert change, needed 0.8 of telephus instead<commit_after>from uuid import uuid4
from pprint import pformat
from telephus.protocol import ManagedCassandraClientFactory
from telephus.client import CassandraClient
from twisted.web.resource import Resource
from twisted.internet import reactor, task
from twisted.web import server
from twisted.internet.defer import inlineCallbacks, returnValue, DeferredList
import logging
from .mixins import MySQLMixin, IdentityQueueMixin
from .base import BaseServer
from telephus.cassandra.c08.ttypes import NotFoundException


logger = logging.getLogger(__name__)


class IdentityServer(BaseServer, MySQLMixin, IdentityQueueMixin):

    name = "HiiSpider Identity Server UUID: %s" % str(uuid4())
    simultaneous_jobs = 50
    active_jobs = 0
    updating_connections = {}
    updating_identities = {}
    connections_queue = []
    connectionsloop = None
    dequeueloop = None
    queue_requests = 0

    def __init__(self, config, port=None):
        super(IdentityServer, self).__init__(config)
        self.plugin_mapping = config["plugin_mapping"]
        self.setupMySQL(config)
{'fraction_non_alphanumeric': 0.06748188405797101, 'fraction_numerical': 0.007246376811594203, 'mean_word_length': 4.828496042216359, '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': '1855144', 'n_tokens_mistral': 632, 'n_tokens_neox': 608, 'n_words': 175}