emfcamp / badge-2024-software

46 stars 29 forks source link

Improve async compatibility of app store #177

Open MatthewWilkes opened 4 months ago

MatthewWilkes commented 4 months ago

This moves some code from the background task to the main task, and refactors it to allow use of async methods. This looks like these tasks were in background from the idea that the background task runs 'in the background', rather than runs 'when the app is in the background'.

There are two calls that use requests.get, which block the update task. By refactoring slightly to use async, we can use async_helpers.unblock to move them to a thread.