Esempio n. 1
0
 def __init__(self):
     self.context = zmq.Context()
     self.socket = self.context.socket(zmq.PUSH)
     self.logger = logger.get_timed_rotating_logger(
         logger_name='cs_db_collector',
         file_name=os.path.join(os.getenv('MAUM_ROOT'),
                                'logs/cs_db_collector_process.log'),
         backup_count=5,
         log_level='debug')
     self.conf = Config()
     self.conf.init('biz.conf')
     self.pipeline_info = util.create_pipeline_info()
     self.tree_map = self.pipeline_info['tree']
     self.select_cnt = 10000
Esempio n. 2
0
sys.path.append(os.path.join(os.getenv('MAUM_ROOT'), 'lib/python'))
from biz.common import util, logger, biz_worker
from biz.process.nlp.nlp_proc import NlpProc

###########
# options #
###########
reload(sys)
sys.setdefaultencoding('utf8')

#############
# constants #
#############
LOGGER = logger.get_timed_rotating_logger(logger_name='nlp',
                                          file_name=os.path.join(
                                              os.getenv('MAUM_ROOT'),
                                              'logs/nlp_process.log'),
                                          backup_count=5,
                                          log_level='debug')
# nlp1-kor : 9811
# nlp2-kor : 9813
# nlp2-eng : 9814
# nlp3-kor : 9823
# 다음 같은 형태로 nlp ip별 프로세스 카운트를 가져온다
# remote_list_cnt = [('127.0.0.1:9813',4),('52.187.180.94:9813',6)]  // nlp2-kor
REMOTE_LIST_CNT = util.get_grpc_service_list('PT0003')
REMOTE_LIST = list()


#######
# def #
#######