Skip to content

use ConnectionManagement middleware to close database connect#213

Merged
mitfik merged 1 commit intorubycas:masterfrom
tsechingho:master
Jun 11, 2014
Merged

use ConnectionManagement middleware to close database connect#213
mitfik merged 1 commit intorubycas:masterfrom
tsechingho:master

Conversation

@tsechingho
Copy link
Contributor

The development log will show warning like

DEPRECATION WARNING: Database connections will not be closed automatically, please close your database connection at the end of the thread by calling close on your connection. For example: ActiveRecord::Base.connection.close'

It can be resolved by adding a middleware ActiveRecord::ConnectionAdapters::ConnectionManagement.

The relative discussion is http://stackoverflow.com/questions/10191531/activerecord-connection-warning-database-connections-will-not-be-closed-automa

mitfik pushed a commit that referenced this pull request Jun 11, 2014
use ConnectionManagement middleware to close database connect
@mitfik mitfik merged commit 2cabb59 into rubycas:master Jun 11, 2014
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