I’ve been doing some digging today and think I discovered what may be causing the problem.
I’ve included a ton of IO.puts so you can see what’s happening.
When I inspect the metas before the update that succeeds, notice it has both phx_ref
and phx_ref_prev
metas. But on the one that fails, it doesn’t have the phx_ref_prev
meta.
I’ve confirmed this pattern happens for every update that fails, even if that update runs first in the loop.
I don’t have the right answer yet but am getting closer and will update you all when I figure it out. I’m assuming there’s an issue with my update_presence function that compiles the metas.