Patch to allow the report bg task to update the data every half hour... For real this time.

This commit is contained in:
Alex Huddleston 2020-04-01 13:02:29 -05:00
parent ccca43bd04
commit dfad3678c4
2 changed files with 2 additions and 1 deletions

View file

@ -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)

View file

@ -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):