コード例 #1
0
    def delay_actions():
        """
        Function that implements timeout
        """
        while True:

            ##### New York State ######

            # execute_scrape_counties_wikipedia() # scraped_county_table # Scraiping blocked from wikipedia

            # time.sleep(10)
            #################################################

            execute_combine_counties_scraped_and_historical(
            )  # combined_county_table

            time.sleep(5)

            execute_wrangle_nyc_percentage_daily_change(
            )  # nyc_percentage_daily_change_table

            time.sleep(1)

            execute_wrangle_counties_new_daily_cases(
            )  # counties_new_daily_cases_table

            time.sleep(1)

            execute_wrangle_counties_timeslider()  # counties_timeslider_table

            ##### NYC ###### CONFIRMED

            # store_historical_nyc() #ONLY FOR RESET and pulling from historical

            # time.sleep(5)

            execute_combine_nyc_scraped_and_historical()
            time.sleep(3)

            ##### NYC ###### FOR PIE CHARTS

            execute_update_age_nyc()

            execute_update_sex_nyc()
            time.sleep(2)

            ##### NYC ###### ZIPCODES

            execute_update_zipcode_nyc()
            time.sleep(2)

            ##### WORLD #####
            execute_update_world()

            if stop_event.is_set():
                break
コード例 #2
0
    def delay_actions():
        """
        Function that implements timeout
        """
        while True:
            
           # #### NYC ###### FOR PIE CHARTS            
            execute_update_age_nyc()           
            execute_update_sex_nyc()
            time.sleep(1)
            
            # ##### NYC ###### ZIPCODES            
            execute_update_zipcode_nyc()
            time.sleep(5)
            
            # # ##### WORLD #####
            execute_update_world() #works when everything commented out
            time.sleep(15)

            # ##### NYC and New York State Based on State Dept of Health ######
            new_york_state_status = wrangle_check_update():
            if new_york_state_status == 'Needs Update':

                execute_get_nyc_update()           
                time.sleep(2)
                execute_get_all_counties_latest()
                time.sleep(2)
                execute_combine_counties()
                time.sleep(5)
                execute_wrangle_nyc_percentage_daily_change() # nyc_percentage_daily_change_table                
                time.sleep(1)                
                execute_wrangle_counties_new_daily_cases() # counties_new_daily_cases_table               
                time.sleep(1)               
                execute_wrangle_counties_timeslider() # counties_timeslider_table
            
            if stop_event.is_set():
                break