Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect when the database gets disconnected #56

Open
searls opened this issue Jan 11, 2021 · 0 comments
Open

Reconnect when the database gets disconnected #56

searls opened this issue Jan 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@searls
Copy link
Member

searls commented Jan 11, 2021

Sometimes when running a test multiple times with the cypress open IDE, the DB connection will die for whatever reason:

2021-01-11 09:10:42 -0500 Rack app ("POST /test_states/database/projects" - (127.0.0.1)): #<ActiveRecord::StatementInvalid: PG::ConnectionBad: connection is closed>

Rather than kill the process and restart, maybe cypress-rails could detect this and attempt to reconnect?

ActiveRecord::Base.connection.reconnect!
@searls searls added the enhancement New feature or request label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant