Skip to content

Conversation

@jnunemaker
Copy link
Collaborator

This was reported by someone using cloud. If they were using database selector middleware and a read request hit when cloud wanted to sync it would error.

This is ugly. There has to be a better way. I'll ask around. If anyone knows, I'm all ears. I tried to find another project/gem doing similar and couldn't.

This was reported by someone using cloud. If they were using database selector middleware and a read request hit when cloud wanted to sync it would error.

This is ugly. There has to be a better way. I'll ask around.
@jnunemaker jnunemaker self-assigned this Dec 7, 2025
@jnunemaker jnunemaker changed the title Handle sync causing write on read request Handle cloud sync causing write on read request Dec 7, 2025
so we dont get duplicate actions
Much easier to just use the methods they provide.
Cleans it up a bit.
In some versions I was getting deprecation message. In others I was getting no arguments allowed. In still others it just worked. Hopefully this gets all versions working.

Updated tests in `active_record_spec.rb` to use helper methods for checking active connections and clearing them. This improves readability and maintainability of the test code while ensuring that ActiveRecord connections are properly managed during feature operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants