コード例 #1
0
def antennas_geolocalization(num):
    """
    Job for geolocalizate antennas every day
    :param num: signal num
    :return: None
    """
    ua = update_antennas_localization(MAX_NUMBER_OF_QUERIES)
    application.logger.info("New geolocalized antennas: " + str(ua))
コード例 #2
0
def antennas_geolocalization(num: int):
    """
    Job for geolocalizate antennas every day
    :param num: signal num
    :return: None
    """
    ua = update_antennas_localization(MAX_NUMBER_OF_QUERIES)
    application.logger.info(
        "New geolocalized antennas: " + str(ua) + " antennas." + datetime.now().strftime(" - %H:%M %d/%m/%Y"))
コード例 #3
0
    def run(self, antennas=1000):
        # parameters validation
        try:
            antennas = int(antennas)
        except:
            print("Antennas must be a number")
            return

        if antennas < 0:
            print("Antennas must be a positive number")
            return

        from app.data.antennas_geolocalization import update_antennas_localization

        geolocated_antennas = update_antennas_localization(
            max_number_of_queries=antennas)
        application.logger.info("New geolocated antennas: " +
                                str(geolocated_antennas))
        print("New geolocated antennas:" + str(geolocated_antennas))
コード例 #4
0
    def run(self, antennas=1000):
        from app.data.antennas_geolocalization import update_antennas_localization

        geolocated_antennas = update_antennas_localization(max_number_of_queries=antennas)
        application.logger.info("New geolocated antennas: " + str(geolocated_antennas))
        print("New geolocated antennas:" + str(geolocated_antennas))