Example #1
0
 def __init__(self, number: int, data: datetime, today: datetime):
     """
     :param number:
     """
     StatisticBaseClass.__init__(self, number, 'beget_registrant_to')
     self.today = today
     self.data = data
Example #2
0
 def __init__(self, number: int, data: datetime, today: datetime, zone: str):
     """
     :param number:
     """
     StatisticBaseClass.__init__(self, number, 'beget_ns_to')
     self.today = today
     self.data = data
     self.zone = PREFIX_LIST_ZONE[zone]
Example #3
0
 def __init__(self, number: int, data: datetime, today: datetime, zone: str):
     """
     :param number:
     """
     StatisticBaseClass.__init__(self, number, "mx_count_")
     self.today = today
     self.data = data
     self.zone_id = PREFIX_LIST_ZONE[zone]
Example #4
0
    def __init__(self, number: int, date: datetime, zone_id: int, data_rows: list, key: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "group_provider_sercher_")

        self.date = date
        self.zone_id = zone_id
        self.data_rows = data_rows
        self.key = key
Example #5
0
    def __init__(self, number: int, data: datetime, today: datetime, zone: str, provider: str, as_number: int):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "%s_to_as" % provider)

        self.today = today
        self.data = data
        self.zone = PREFIX_LIST_ZONE[zone]
        self.as_number = as_number
        self.provider = provider
Example #6
0
    def __init__(self, number: int, data: datetime, today: datetime, zone: str):
        """
        :param number:
        """
        StatisticBaseClass.__init__(self, number, "group_provider_")

        self.today = today
        self.data = data
        self.zone_id = PREFIX_LIST_ZONE[zone]

        self.count_ptheread = 0
        self.process_list = []
Example #7
0
    def create_table(provider: str):
        sql = """CREATE TABLE IF NOT EXISTS `%s_domain_as_to_count_statistic` (
                 `id` int(11) NOT NULL AUTO_INCREMENT,
                 `date` date NOT NULL,
                 `domain_name` varchar(256) DEFAULT NULL,
                 `as_to` int(11) NOT NULL,
                 `tld` tinyint(3) unsigned NOT NULL,
                 PRIMARY KEY (`id`),
                 KEY `date` (`date`),
                 KEY `domain_name` (`domain_name`)
               ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;""" % provider

        StatisticBaseClass.create_db_if_not_exist(sql)