Title says it all - how can I tell which apps are using datatable storage. I know some older ones are hogging it, but I have no idea which.
ianb
June 22, 2022, 8:26pm
2
I remember this being a topic a long while ago (like well over a year ago) but I don’t remember if there ever was any resolution.
ianb
June 22, 2022, 8:35pm
3
Going down the rabbit hole linkie trail led me to this post, where Phil and Stefano figured out how to access app data semi programmatically if you have lots of apps:
Holy smokes! I haven’t seen this documented anywhere, so I suppose it’s subject to change without notice. I would also expect that this only works after you successfully log in as an Anvil user. Even so…
I tried the 1st link, got a JSON listing of all of my apps! That’s incredibly helpful.
I wasn’t sure how to use the 2nd link. But if you append the app’s “id” (from the 1st link) immediately after the trailing “/”, the response is a copy of the corresponding app as a .yaml file. In a br…
But I think you might end up having to build an uplink script to build the answer to what you are looking for, I’m sure the new .disconnect()
feature might help.
I forgot how easy this is now:
import anvil.server
from contextlib import contextmanager
@contextmanager
def open_anvil_connection(uplink_key):
anvil.server.connect(uplink_key)
print("Connected to Anvil")
yield
anvil.server.disconnect()
print("Disconnected from Anvil")
Thats it.
Now you can use:
with open_anvil_connection(my_uplink_key):
stuff = anvil.server.call("some_remote_function")
results = blah_blah_do_crunchy_crunchy_on_stuff(stuff)
anvil.server.ca…
1 Like
Yeah I figured that was probably the only way, I just hoped for something a bit easier …
Hey ho.
Not quite so urgent at the moment - I realised that Anvil must have broken something (and it wasn’t due to my datatables being full).
I created a feature request: Account Dashboard
1 Like