<commit_before>import logging

import conf
import core

from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from thrift.server import TServer

from rpc import RndProcessApi

logger = logging.getLogger(__name__)

class RndProcessHandler(object):

    def runProcess(self, process):
        core.executeProcessCommand(process)

def start():
    logger.info("Staring Render Node Daemon on TCP port %d" % conf.NETWORK_PORT)
    handler = RndProcessHandler()
    processor = RndProcessApi.Processor(handler)
    transport = TSocket.TServerSocket(port=conf.NETWORK_PORT)
    tfactory = TTransport.TBufferedTransportFactory()
    pfactory = TBinaryProtocol.TBinaryProtocolFactory()
    server = TServer.TSimpleServer(processor, transport, tfactory, pfactory)
    server.serve()
<commit_msg>changed to the threaded server because simple server only handles a simple selection.<commit_after>import logging

import conf
import core

from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from thrift.server import TServer

from rpc import RndProcessApi

logger = logging.getLogger(__name__)

class RndProcessHandler(object):

    def runProcess(self, process):
        core.runProcess(process)

def start():
    logger.info("Staring Render Node Daemon on TCP port %d" % conf.NETWORK_PORT)
    handler = RndProcessHandler()
    processor = RndProcessApi.Processor(handler)
    transport = TSocket.TServerSocket(port=conf.NETWORK_PORT)
    tfactory = TTransport.TBufferedTransportFactory()
    pfactory = TBinaryProtocol.TBinaryProtocolFactory()
    server = TServer.TThreadedServer(processor, transport, tfactory, pfactory)
    server.serve()

{'fraction_non_alphanumeric': 0.07187323146576118, 'fraction_numerical': 0.0, 'mean_word_length': 5.225352112676056, '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': '1053062', 'n_tokens_mistral': 486, 'n_tokens_neox': 484, 'n_words': 134}