Permalink
Browse files

Enable reconnect mysql

  • Loading branch information...
mirakui committed Oct 22, 2017
1 parent 9dcfd8a commit fa8c84ce4fbbeb9b68852b2f8d761af209b2aeec
Showing with 4 additions and 4 deletions.
  1. +4 −4 isubata/webapp/ruby/app.rb
@@ -427,10 +427,10 @@ def db
username: ENV.fetch('ISUBATA_DB_USER') { 'root' },
password: ENV.fetch('ISUBATA_DB_PASSWORD') { '' },
database: 'isubata',
encoding: 'utf8mb4'
).tap do |mysql|
mysql.query('SET SESSION sql_mode=\'TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY\'')
end
encoding: 'utf8mb4',
reconnect: true,
init_command: %q!SET SESSION sql_mode='TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY'!
)
end
def db_get_user(user_id)

0 comments on commit fa8c84c

Please sign in to comment.