def __init__(self, msgh, config): CalcManager.__init__(self, msgh) self.report_fd = None self.config = config self.stat_user = StatUser(config['start'], config['end']) self.rpt_print_intvl = 40 self.category_count = {1001: 0, # play 1002: 0, # zongyi 1003: 0, 1004: 0, # movie 1005: 0, # catoon 1006: 0, 1007: 0, # sport 1008: 0, 1009: 0, 1010: 0, 1011: 0, 1012: 0, # child 1013: 0, 1014: 0, 1015: 0, 1016: 0, 1017: 0, 1100: 0 } self.country_count = {} #self.eh.register_timer(self.rpt_print_intvl * 1000, # TMTAGS.PRINT_REPORT, True) self.db = Mydb() self.db.connect('report')
def __init__(self, msgh, config): CalcManager.__init__(self, msgh) self.report_fd = None self.collectors = {} self.config = config self.data = {} self.top_data = {}
def __init__(self, msgh, config): CalcManager.__init__(self, msgh) self.report_fd = None self.collectors = {} self.config = config self.stat_user = StatUser(config['start'], config['end']) self.rpt_print_intvl = 10 #self.eh.register_timer(self.rpt_print_intvl * 1000, # TMTAGS.PRINT_REPORT, True) self.db = Mydb() self.db.connect('report')
def __init__(self, msgh, config): CalcManager.__init__(self, msgh) self.report_fd = None self.collectors = {} self.config = config self.stat_user = StatUser(config['start'], config['end']) self.rpt_print_intvl = 40 #self.eh.register_timer(self.rpt_print_intvl * 1000, # TMTAGS.PRINT_REPORT, True) self.db = Mydb() self.db.connect('report')
def __init__(self, msgh, config): CalcManager.__init__(self, msgh) self.report_fd = None self.collectors = {} self.config = config self.db = Mydb() self.db.connect('report') dbname = "freq_trends_" + dbname_dict[api] self.dbsession = self.db.open(dbname) self.data = {} self.trends_data = {} self.top_data = {}
def __init__(self, msgh, config): CalcManager.__init__(self, msgh) self.report_fd = None self.collectors = {} self.config = config self.stat_user = StatUser(config['start'], config['end']) self.analysis_time = StatTime(config['start_analysis'], config['end_analysis']) self.rpt_print_intvl = 40 self.commit_intvl = 30 self.eh.register_timer(self.commit_intvl * 1000, TMTAGS.DB_COMMIT, True) self.db = Mydb() self.db.connect('repository') self.dbsession = self.db.open('all_users')