Replies: 3 comments 2 replies
-
|
I think I have found something that works, but it is throwing an error. Looking at the electric sql collection I can call .cleanup() on the collection, which wipes it and stops the sync. But an error is thrown : ERROR [Live Query Error] Source collection 'sync-animals-meta' was manually cleaned up while live query 'live-query-37' depends on it. Live queries prevent automatic GC, so this was likely a manual cleanup() call. So i'm guessing that collection.cleanup() is not the intended way to wipe and stop a sync on collections? Any help here would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
Perfect, the key for the collections is very helpful. Does the query unsubscribe automatically when the view goes away or changes? I still see them attempting a sync when i logout the user and send them to a login screen. If I run the .cleanup() on the collection then it stops the sync. thanks! |
Beta Was this translation helpful? Give feedback.
-
|
That makes sense, I must have something to keep the subscription open with the query. I'll attempt the cleanup onError too, thank you for all you do! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Electric SQL collection + useLiveQuery. I am trying to figure out the best way to cancel / abort the syncing process. The ability that useQuery has for setting enabled would be ideal here. I am seeing the collection still attempting syncs after a user logs out, and is getting failed requests. It would be nice to enable/disable a collection or query. Is this currently possible?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions