diff --git a/lib/covid_report_lib.py b/lib/covid_report_lib.py index 02e51cc..1d455ab 100644 --- a/lib/covid_report_lib.py +++ b/lib/covid_report_lib.py @@ -20,6 +20,6 @@ async def background_task(client, config_dict): for selection in config_dict['report_selections']: await channel.send(get_covid_data(selection)) await channel.send(get_top_data(config_dict['report_top_number'])) - elif(current_hour_and_minute[1] == 0): + elif(current_hour_and_minute[1] == 0 or current_hour_and_minute[1] == 30): update_data() await sleep(60) diff --git a/lib/parse_data.py b/lib/parse_data.py index 565b077..5908578 100755 --- a/lib/parse_data.py +++ b/lib/parse_data.py @@ -57,6 +57,7 @@ def update_data(): elif(row.findAll('td')[0] and row.findAll('td')[0].text): set_data( session, row.findAll('td')[0].text.replace(':', ''), [r.text for r in row.findAll('td')]) + session.close() def format_covid_data(columns, data):