def __init__(self): BaseComponent.__init__(self, 'GI') self.c_words = DBCache(const.WORDS_PREFIX, config.DEFAULT_EXPIRE, const.WORDS_SQL) self.reloadWords() self.haystack = None self.ref = None self.prefix = None self.success = None self.found_msisdn = None self.reload = datetime.now() + timedelta(seconds=RELOAD_WORDS)
def __init__(self): BaseComponent.__init__(self, 'YM') self.c_mutdepo = DBCache(const.MUTATION_PREFIX, config.DEFAULT_EXPIRE, const.MUTATION_SQL) self.c_mutdepo.setConn(self.dbconn, self.cacheconn) self.c_ym_handler = DBCache2(const.YM_HANDLER_PREFIX, config.DEFAULT_EXPIRE, const.YM_HANDLER_SQL) self.c_ym_handler.setConn(self.dbconn, self.cacheconn) self.rrb = {} self.prepareCache() self.ymgate = '{0}@{1}'.format(config.IMGATE, config.MSG_SERVER) self.log = mylogger('YMHandler', 'YMHandler.log')
def __init__(self): BaseComponent.__init__(self, "AU") self.c_operator = DBCache( const.OPERATOR_PREFIX, config.DEFAULT_EXPIRE, const.OPERATOR_SQL, user_func={"prefix": lambda x: x.split(",")}, ) self.c_product = DBCache(const.PRODUCT_PREFIX, config.DEFAULT_EXPIRE, const.PRODUCT_SQL) self.c_agentprice = DBCache(const.AGENTPRICE_PREFIX, config.DEFAULT_EXPIRE, const.AGENTPRICE_SQL) self.dm = DepositMutation(5, self.dbconn, self.cacheconn) self.um = UnitMutation(5, self.dbconn, self.cacheconn) self.log = mylogger("Authorizer", "authorizer.log")
def __init__(self): BaseComponent.__init__(self, 'MC') self.logger = mylogger('SanityCheck')
def __init__(self): BaseComponent.__init__(self, 'MC') self.c_dev = DBCache(const.DEVICES_PREFIX, config.DEFAULT_EXPIRE, const.DEVICES_SQL) self.logger = mylogger('MassStockCheck')
def __init__(self): BaseComponent.__init__(self, 'OC') self.log = mylogger('OtherCommand', 'othercommand.log') self.num = {} self.dev = {}