astronomer/airflow/version_check/update_checks.py
def run(self):
        """
        Periodically check for new versions of Astronomer Certified Airflow,
        and update the AstronomerAvailableVersions table
        """
        if self.check_interval_secs == 0:
            self.log.info("Update checks disabled")
            return

        self.ac_version = get_ac_version()

        self.hide_old_versions()

        # On start up sleep for a small amount of time (to give the scheduler time to start up properly)
        rand_delay = random.uniform(5, 20)
        self.log.debug("Waiting %d seconds before doing first check", rand_delay)
        time.sleep(rand_delay)
        while True:
            try:
                update_available, wake_up_in = self.check_for_update()
                if update_available == UpdateResult.SUCCESS_UPDATE_AVAIL:
                    self.log.info("A new version of Astronomer Certified Airflow is available")
                self.log.info("Check finished, next check in %s seconds", wake_up_in)
            except Exception:
                self.log.exception("Update check died with an exception, trying again in one hour")
                wake_up_in = 3600

            time.sleep(wake_up_in)

        Periodically check for new versions of Astronomer Certified Airflow,
        and update the AstronomerAvailableVersions table
        
Periodically check for new versions of Astronomer Certified Airflow,
and update the AstronomerAvailableVersions table
Periodically check for new versions of Astronomer Certified Airflow and update the AstronomerAvailableVersions table
def run(self):
        if self.check_interval_secs == 0:
            self.log.info("Update checks disabled")
            return
        self.ac_version = get_ac_version()
        self.hide_old_versions()
        rand_delay = random.uniform(5, 20)
        self.log.debug("Waiting %d seconds before doing first check", rand_delay)
        time.sleep(rand_delay)
        while True:
            try:
                update_available, wake_up_in = self.check_for_update()
                if update_available == UpdateResult.SUCCESS_UPDATE_AVAIL:
                    self.log.info("A new version of Astronomer Certified Airflow is available")
                self.log.info("Check finished, next check in %s seconds", wake_up_in)
            except Exception:
                self.log.exception("Update check died with an exception, trying again in one hour")
                wake_up_in = 3600
            time.sleep(wake_up_in)
def run ( self ) : if self . check_interval_secs == 0 : self . log . info ( "Update checks disabled" ) return self . ac_version = get_ac_version ( ) self . hide_old_versions ( ) rand_delay = random . uniform ( 5 , 20 ) self . log . debug ( "Waiting %d seconds before doing first check" , rand_delay ) time . sleep ( rand_delay ) while True : try : update_available , wake_up_in = self . check_for_update ( ) if update_available == UpdateResult . SUCCESS_UPDATE_AVAIL : self . log . info ( "A new version of Astronomer Certified Airflow is available" ) self . log . info ( "Check finished, next check in %s seconds" , wake_up_in ) except Exception : self . log . exception ( "Update check died with an exception, trying again in one hour" ) wake_up_in = 3600 time . sleep ( wake_up_in )
Periodically check for new versions of Astronomer Certified Airflow,
and update the AstronomerAvailableVersions table
Periodically check for new versions of Astronomer Certified Airflow and update the AstronomerAvailableVersions table
"""
        Periodically check for new versions of Astronomer Certified Airflow,
        and update the AstronomerAvailableVersions table
        """ # On start up sleep for a small amount of time (to give the scheduler time to start up properly)
self