I noticed that the list returned by Anvil.server.list_background_tasks() keeps growing, even after app restarts.
This might become problematic if I want to poll the list in order to update the UI.
Also the list might contain some entries that throw a (confusing) exception when accessing some of the task’s methods (I presume for the ‘missing’ state).
To answer my own question: next to the app console tab at the bottom of the IDE is a Background Tasks tab. It will show this:
Press “View all previous tasks” when the app is stopped (otherwise it won’t do anything). Then at the top right of the list of tasks is a delete button.
1 Like
I asked a similar question, but didn’t have an answer: How long do background tasks stay in the list?
I ended up using a data table to communicate with the background tasks.
1 Like