Closed cesargdm closed 5 years ago
this is covered in the docs: https://github.com/Nozbe/WatermelonDB/blob/master/docs/Actions.md
@cesargdm let me know if the issue is fixed
@radex Just the trick in my case is that the actions can be fired at random, because I may recieve 3 responses and a moment after 5 more, and just before 10 more... So that's why I'm getting the warning. So I was just looking for a way to prepare Watermelon for this if there was anyway. If not, I can just close the issue. It's really not being a issue for me.
No, if it's not an issue, then it's not really an issue. The warning is just like it says — a warning of a POTENTIAL problem. If you'd like, you could contribute an improvement that the warning is only showed after a certain timeout — say, 1 or 5 seconds.
I make an updates to Watermelon after I upload local objects to my backend, since I call
Promise.all()
the network requests are made concurrent and In my code I call the update method like this:And then the response is made, I get the warning
The action you're trying to perform (unnamed) can't be performed yet, beacuse there are 4 actions in the queue. Current action: unnamed. Ignore this message if everything is working fine. But if your actions are not running, it's because the current action is stuck.
No updates are thrown off, but I'm curious if I this action can be handled better.