Patch to allow the report bg task to update the data every half hour... For real this time.
This commit is contained in:
parent
ccca43bd04
commit
dfad3678c4
2 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
Reference in a new issue